/**
 * Autogenerated by Thrift Compiler (0.19.0)
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
 */
using System;
using System.Collections;
using System.Collections.Generic;
using System.Text;
using System.IO;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Extensions.Logging;
using Thrift;
using Thrift.Collections;
using Thrift.Protocol;
using Thrift.Protocol.Entities;
using Thrift.Protocol.Utilities;
using Thrift.Transport;
using Thrift.Transport.Client;
using Thrift.Transport.Server;
using Thrift.Processor;


#nullable enable                 // requires C# 8.0
#pragma warning disable IDE0079  // remove unnecessary pragmas
#pragma warning disable IDE0017  // object init can be simplified
#pragma warning disable IDE0028  // collection init can be simplified
#pragma warning disable IDE1006  // parts of the code use IDL spelling
#pragma warning disable CA1822   // empty DeepCopy() methods still non-static

namespace QueryCat.Plugins.Sdk
{
  public partial class Plugin
  {
    public interface IAsync
    {
      global::System.Threading.Tasks.Task<global::QueryCat.Plugins.Sdk.VariantValue> CallFunctionAsync(string function_name, List<global::QueryCat.Plugins.Sdk.VariantValue>? @args, int object_handle, CancellationToken cancellationToken = default);

      global::System.Threading.Tasks.Task InitializeAsync(CancellationToken cancellationToken = default);

      global::System.Threading.Tasks.Task ShutdownAsync(CancellationToken cancellationToken = default);

      global::System.Threading.Tasks.Task<List<global::QueryCat.Plugins.Sdk.Column>> RowsSet_GetColumnsAsync(int object_handle, CancellationToken cancellationToken = default);

      global::System.Threading.Tasks.Task RowsSet_OpenAsync(int object_handle, CancellationToken cancellationToken = default);

      global::System.Threading.Tasks.Task RowsSet_CloseAsync(int object_handle, CancellationToken cancellationToken = default);

      global::System.Threading.Tasks.Task RowsSet_ResetAsync(int object_handle, CancellationToken cancellationToken = default);

      global::System.Threading.Tasks.Task RowsSet_SetContextAsync(int object_handle, global::QueryCat.Plugins.Sdk.ContextQueryInfo? context_query_info, CancellationToken cancellationToken = default);

      global::System.Threading.Tasks.Task<global::QueryCat.Plugins.Sdk.RowsList> RowsSet_GetRowsAsync(int object_handle, int @count, CancellationToken cancellationToken = default);

      global::System.Threading.Tasks.Task<List<string>> RowsSet_GetUniqueKeyAsync(int object_handle, CancellationToken cancellationToken = default);

      global::System.Threading.Tasks.Task<List<global::QueryCat.Plugins.Sdk.KeyColumn>> RowsSet_GetKeyColumnsAsync(int object_handle, CancellationToken cancellationToken = default);

      global::System.Threading.Tasks.Task RowsSet_SetKeyColumnValueAsync(int object_handle, int column_index, string @operation, global::QueryCat.Plugins.Sdk.VariantValue? @value, CancellationToken cancellationToken = default);

      global::System.Threading.Tasks.Task<bool> RowsSet_UpdateValueAsync(int object_handle, int column_index, global::QueryCat.Plugins.Sdk.VariantValue? @value, CancellationToken cancellationToken = default);

      global::System.Threading.Tasks.Task RowsSet_WriteValueAsync(int object_handle, List<global::QueryCat.Plugins.Sdk.VariantValue>? @values, CancellationToken cancellationToken = default);

      global::System.Threading.Tasks.Task<byte[]> Blob_ReadAsync(int object_handle, int @offset, int @count, CancellationToken cancellationToken = default);

      global::System.Threading.Tasks.Task<long> Blob_GetLengthAsync(int object_handle, CancellationToken cancellationToken = default);

    }


    public class Client : TBaseClient, IDisposable, IAsync
    {
      public Client(TProtocol protocol) : this(protocol, protocol)
      {
      }

      public Client(TProtocol inputProtocol, TProtocol outputProtocol) : base(inputProtocol, outputProtocol)
      {
      }

      public async global::System.Threading.Tasks.Task<global::QueryCat.Plugins.Sdk.VariantValue> CallFunctionAsync(string function_name, List<global::QueryCat.Plugins.Sdk.VariantValue>? @args, int object_handle, CancellationToken cancellationToken = default)
      {
        await send_CallFunctionAsync(function_name, @args, object_handle, cancellationToken);
        return await recv_CallFunctionAsync(cancellationToken);
      }

      public async global::System.Threading.Tasks.Task send_CallFunctionAsync(string function_name, List<global::QueryCat.Plugins.Sdk.VariantValue>? @args, int object_handle, CancellationToken cancellationToken = default)
      {
        await OutputProtocol.WriteMessageBeginAsync(new TMessage("CallFunction", TMessageType.Call, SeqId), cancellationToken);
        
        var tmp185 = new InternalStructs.CallFunction_args() {
          FunctionName = function_name,
          Args = @args,
          ObjectHandle = object_handle,
        };
        
        await tmp185.WriteAsync(OutputProtocol, cancellationToken);
        await OutputProtocol.WriteMessageEndAsync(cancellationToken);
        await OutputProtocol.Transport.FlushAsync(cancellationToken);
      }

      public async global::System.Threading.Tasks.Task<global::QueryCat.Plugins.Sdk.VariantValue> recv_CallFunctionAsync(CancellationToken cancellationToken = default)
      {
        
        var tmp186 = await InputProtocol.ReadMessageBeginAsync(cancellationToken);
        if (tmp186.Type == TMessageType.Exception)
        {
          var tmp187 = await TApplicationException.ReadAsync(InputProtocol, cancellationToken);
          await InputProtocol.ReadMessageEndAsync(cancellationToken);
          throw tmp187;
        }

        var tmp188 = new InternalStructs.CallFunction_result();
        await tmp188.ReadAsync(InputProtocol, cancellationToken);
        await InputProtocol.ReadMessageEndAsync(cancellationToken);
        if (tmp188.__isset.success)
        {
          return tmp188.Success!;
        }
        if (tmp188.__isset.@e)
        {
          throw tmp188.E!;
        }
        throw new TApplicationException(TApplicationException.ExceptionType.MissingResult, "CallFunctionAsync failed: unknown result");
      }

      public async global::System.Threading.Tasks.Task InitializeAsync(CancellationToken cancellationToken = default)
      {
        await send_InitializeAsync(cancellationToken);
        await recv_InitializeAsync(cancellationToken);
      }

      public async global::System.Threading.Tasks.Task send_InitializeAsync(CancellationToken cancellationToken = default)
      {
        await OutputProtocol.WriteMessageBeginAsync(new TMessage("Initialize", TMessageType.Call, SeqId), cancellationToken);
        
        var tmp189 = new InternalStructs.Initialize_args() {
        };
        
        await tmp189.WriteAsync(OutputProtocol, cancellationToken);
        await OutputProtocol.WriteMessageEndAsync(cancellationToken);
        await OutputProtocol.Transport.FlushAsync(cancellationToken);
      }

      public async global::System.Threading.Tasks.Task recv_InitializeAsync(CancellationToken cancellationToken = default)
      {
        
        var tmp190 = await InputProtocol.ReadMessageBeginAsync(cancellationToken);
        if (tmp190.Type == TMessageType.Exception)
        {
          var tmp191 = await TApplicationException.ReadAsync(InputProtocol, cancellationToken);
          await InputProtocol.ReadMessageEndAsync(cancellationToken);
          throw tmp191;
        }

        var tmp192 = new InternalStructs.Initialize_result();
        await tmp192.ReadAsync(InputProtocol, cancellationToken);
        await InputProtocol.ReadMessageEndAsync(cancellationToken);
        if (tmp192.__isset.@e)
        {
          throw tmp192.E!;
        }
      }

      public async global::System.Threading.Tasks.Task ShutdownAsync(CancellationToken cancellationToken = default)
      {
        await send_ShutdownAsync(cancellationToken);
        await recv_ShutdownAsync(cancellationToken);
      }

      public async global::System.Threading.Tasks.Task send_ShutdownAsync(CancellationToken cancellationToken = default)
      {
        await OutputProtocol.WriteMessageBeginAsync(new TMessage("Shutdown", TMessageType.Call, SeqId), cancellationToken);
        
        var tmp193 = new InternalStructs.Shutdown_args() {
        };
        
        await tmp193.WriteAsync(OutputProtocol, cancellationToken);
        await OutputProtocol.WriteMessageEndAsync(cancellationToken);
        await OutputProtocol.Transport.FlushAsync(cancellationToken);
      }

      public async global::System.Threading.Tasks.Task recv_ShutdownAsync(CancellationToken cancellationToken = default)
      {
        
        var tmp194 = await InputProtocol.ReadMessageBeginAsync(cancellationToken);
        if (tmp194.Type == TMessageType.Exception)
        {
          var tmp195 = await TApplicationException.ReadAsync(InputProtocol, cancellationToken);
          await InputProtocol.ReadMessageEndAsync(cancellationToken);
          throw tmp195;
        }

        var tmp196 = new InternalStructs.Shutdown_result();
        await tmp196.ReadAsync(InputProtocol, cancellationToken);
        await InputProtocol.ReadMessageEndAsync(cancellationToken);
        if (tmp196.__isset.@e)
        {
          throw tmp196.E!;
        }
      }

      public async global::System.Threading.Tasks.Task<List<global::QueryCat.Plugins.Sdk.Column>> RowsSet_GetColumnsAsync(int object_handle, CancellationToken cancellationToken = default)
      {
        await send_RowsSet_GetColumnsAsync(object_handle, cancellationToken);
        return await recv_RowsSet_GetColumnsAsync(cancellationToken);
      }

      public async global::System.Threading.Tasks.Task send_RowsSet_GetColumnsAsync(int object_handle, CancellationToken cancellationToken = default)
      {
        await OutputProtocol.WriteMessageBeginAsync(new TMessage("RowsSet_GetColumns", TMessageType.Call, SeqId), cancellationToken);
        
        var tmp197 = new InternalStructs.RowsSet_GetColumns_args() {
          ObjectHandle = object_handle,
        };
        
        await tmp197.WriteAsync(OutputProtocol, cancellationToken);
        await OutputProtocol.WriteMessageEndAsync(cancellationToken);
        await OutputProtocol.Transport.FlushAsync(cancellationToken);
      }

      public async global::System.Threading.Tasks.Task<List<global::QueryCat.Plugins.Sdk.Column>> recv_RowsSet_GetColumnsAsync(CancellationToken cancellationToken = default)
      {
        
        var tmp198 = await InputProtocol.ReadMessageBeginAsync(cancellationToken);
        if (tmp198.Type == TMessageType.Exception)
        {
          var tmp199 = await TApplicationException.ReadAsync(InputProtocol, cancellationToken);
          await InputProtocol.ReadMessageEndAsync(cancellationToken);
          throw tmp199;
        }

        var tmp200 = new InternalStructs.RowsSet_GetColumns_result();
        await tmp200.ReadAsync(InputProtocol, cancellationToken);
        await InputProtocol.ReadMessageEndAsync(cancellationToken);
        if (tmp200.__isset.success)
        {
          return tmp200.Success!;
        }
        if (tmp200.__isset.@e)
        {
          throw tmp200.E!;
        }
        throw new TApplicationException(TApplicationException.ExceptionType.MissingResult, "RowsSet_GetColumnsAsync failed: unknown result");
      }

      public async global::System.Threading.Tasks.Task RowsSet_OpenAsync(int object_handle, CancellationToken cancellationToken = default)
      {
        await send_RowsSet_OpenAsync(object_handle, cancellationToken);
        await recv_RowsSet_OpenAsync(cancellationToken);
      }

      public async global::System.Threading.Tasks.Task send_RowsSet_OpenAsync(int object_handle, CancellationToken cancellationToken = default)
      {
        await OutputProtocol.WriteMessageBeginAsync(new TMessage("RowsSet_Open", TMessageType.Call, SeqId), cancellationToken);
        
        var tmp201 = new InternalStructs.RowsSet_Open_args() {
          ObjectHandle = object_handle,
        };
        
        await tmp201.WriteAsync(OutputProtocol, cancellationToken);
        await OutputProtocol.WriteMessageEndAsync(cancellationToken);
        await OutputProtocol.Transport.FlushAsync(cancellationToken);
      }

      public async global::System.Threading.Tasks.Task recv_RowsSet_OpenAsync(CancellationToken cancellationToken = default)
      {
        
        var tmp202 = await InputProtocol.ReadMessageBeginAsync(cancellationToken);
        if (tmp202.Type == TMessageType.Exception)
        {
          var tmp203 = await TApplicationException.ReadAsync(InputProtocol, cancellationToken);
          await InputProtocol.ReadMessageEndAsync(cancellationToken);
          throw tmp203;
        }

        var tmp204 = new InternalStructs.RowsSet_Open_result();
        await tmp204.ReadAsync(InputProtocol, cancellationToken);
        await InputProtocol.ReadMessageEndAsync(cancellationToken);
        if (tmp204.__isset.@e)
        {
          throw tmp204.E!;
        }
      }

      public async global::System.Threading.Tasks.Task RowsSet_CloseAsync(int object_handle, CancellationToken cancellationToken = default)
      {
        await send_RowsSet_CloseAsync(object_handle, cancellationToken);
        await recv_RowsSet_CloseAsync(cancellationToken);
      }

      public async global::System.Threading.Tasks.Task send_RowsSet_CloseAsync(int object_handle, CancellationToken cancellationToken = default)
      {
        await OutputProtocol.WriteMessageBeginAsync(new TMessage("RowsSet_Close", TMessageType.Call, SeqId), cancellationToken);
        
        var tmp205 = new InternalStructs.RowsSet_Close_args() {
          ObjectHandle = object_handle,
        };
        
        await tmp205.WriteAsync(OutputProtocol, cancellationToken);
        await OutputProtocol.WriteMessageEndAsync(cancellationToken);
        await OutputProtocol.Transport.FlushAsync(cancellationToken);
      }

      public async global::System.Threading.Tasks.Task recv_RowsSet_CloseAsync(CancellationToken cancellationToken = default)
      {
        
        var tmp206 = await InputProtocol.ReadMessageBeginAsync(cancellationToken);
        if (tmp206.Type == TMessageType.Exception)
        {
          var tmp207 = await TApplicationException.ReadAsync(InputProtocol, cancellationToken);
          await InputProtocol.ReadMessageEndAsync(cancellationToken);
          throw tmp207;
        }

        var tmp208 = new InternalStructs.RowsSet_Close_result();
        await tmp208.ReadAsync(InputProtocol, cancellationToken);
        await InputProtocol.ReadMessageEndAsync(cancellationToken);
        if (tmp208.__isset.@e)
        {
          throw tmp208.E!;
        }
      }

      public async global::System.Threading.Tasks.Task RowsSet_ResetAsync(int object_handle, CancellationToken cancellationToken = default)
      {
        await send_RowsSet_ResetAsync(object_handle, cancellationToken);
        await recv_RowsSet_ResetAsync(cancellationToken);
      }

      public async global::System.Threading.Tasks.Task send_RowsSet_ResetAsync(int object_handle, CancellationToken cancellationToken = default)
      {
        await OutputProtocol.WriteMessageBeginAsync(new TMessage("RowsSet_Reset", TMessageType.Call, SeqId), cancellationToken);
        
        var tmp209 = new InternalStructs.RowsSet_Reset_args() {
          ObjectHandle = object_handle,
        };
        
        await tmp209.WriteAsync(OutputProtocol, cancellationToken);
        await OutputProtocol.WriteMessageEndAsync(cancellationToken);
        await OutputProtocol.Transport.FlushAsync(cancellationToken);
      }

      public async global::System.Threading.Tasks.Task recv_RowsSet_ResetAsync(CancellationToken cancellationToken = default)
      {
        
        var tmp210 = await InputProtocol.ReadMessageBeginAsync(cancellationToken);
        if (tmp210.Type == TMessageType.Exception)
        {
          var tmp211 = await TApplicationException.ReadAsync(InputProtocol, cancellationToken);
          await InputProtocol.ReadMessageEndAsync(cancellationToken);
          throw tmp211;
        }

        var tmp212 = new InternalStructs.RowsSet_Reset_result();
        await tmp212.ReadAsync(InputProtocol, cancellationToken);
        await InputProtocol.ReadMessageEndAsync(cancellationToken);
        if (tmp212.__isset.@e)
        {
          throw tmp212.E!;
        }
      }

      public async global::System.Threading.Tasks.Task RowsSet_SetContextAsync(int object_handle, global::QueryCat.Plugins.Sdk.ContextQueryInfo? context_query_info, CancellationToken cancellationToken = default)
      {
        await send_RowsSet_SetContextAsync(object_handle, context_query_info, cancellationToken);
        await recv_RowsSet_SetContextAsync(cancellationToken);
      }

      public async global::System.Threading.Tasks.Task send_RowsSet_SetContextAsync(int object_handle, global::QueryCat.Plugins.Sdk.ContextQueryInfo? context_query_info, CancellationToken cancellationToken = default)
      {
        await OutputProtocol.WriteMessageBeginAsync(new TMessage("RowsSet_SetContext", TMessageType.Call, SeqId), cancellationToken);
        
        var tmp213 = new InternalStructs.RowsSet_SetContext_args() {
          ObjectHandle = object_handle,
          ContextQueryInfo = context_query_info,
        };
        
        await tmp213.WriteAsync(OutputProtocol, cancellationToken);
        await OutputProtocol.WriteMessageEndAsync(cancellationToken);
        await OutputProtocol.Transport.FlushAsync(cancellationToken);
      }

      public async global::System.Threading.Tasks.Task recv_RowsSet_SetContextAsync(CancellationToken cancellationToken = default)
      {
        
        var tmp214 = await InputProtocol.ReadMessageBeginAsync(cancellationToken);
        if (tmp214.Type == TMessageType.Exception)
        {
          var tmp215 = await TApplicationException.ReadAsync(InputProtocol, cancellationToken);
          await InputProtocol.ReadMessageEndAsync(cancellationToken);
          throw tmp215;
        }

        var tmp216 = new InternalStructs.RowsSet_SetContext_result();
        await tmp216.ReadAsync(InputProtocol, cancellationToken);
        await InputProtocol.ReadMessageEndAsync(cancellationToken);
        if (tmp216.__isset.@e)
        {
          throw tmp216.E!;
        }
      }

      public async global::System.Threading.Tasks.Task<global::QueryCat.Plugins.Sdk.RowsList> RowsSet_GetRowsAsync(int object_handle, int @count, CancellationToken cancellationToken = default)
      {
        await send_RowsSet_GetRowsAsync(object_handle, @count, cancellationToken);
        return await recv_RowsSet_GetRowsAsync(cancellationToken);
      }

      public async global::System.Threading.Tasks.Task send_RowsSet_GetRowsAsync(int object_handle, int @count, CancellationToken cancellationToken = default)
      {
        await OutputProtocol.WriteMessageBeginAsync(new TMessage("RowsSet_GetRows", TMessageType.Call, SeqId), cancellationToken);
        
        var tmp217 = new InternalStructs.RowsSet_GetRows_args() {
          ObjectHandle = object_handle,
          Count = @count,
        };
        
        await tmp217.WriteAsync(OutputProtocol, cancellationToken);
        await OutputProtocol.WriteMessageEndAsync(cancellationToken);
        await OutputProtocol.Transport.FlushAsync(cancellationToken);
      }

      public async global::System.Threading.Tasks.Task<global::QueryCat.Plugins.Sdk.RowsList> recv_RowsSet_GetRowsAsync(CancellationToken cancellationToken = default)
      {
        
        var tmp218 = await InputProtocol.ReadMessageBeginAsync(cancellationToken);
        if (tmp218.Type == TMessageType.Exception)
        {
          var tmp219 = await TApplicationException.ReadAsync(InputProtocol, cancellationToken);
          await InputProtocol.ReadMessageEndAsync(cancellationToken);
          throw tmp219;
        }

        var tmp220 = new InternalStructs.RowsSet_GetRows_result();
        await tmp220.ReadAsync(InputProtocol, cancellationToken);
        await InputProtocol.ReadMessageEndAsync(cancellationToken);
        if (tmp220.__isset.success)
        {
          return tmp220.Success!;
        }
        if (tmp220.__isset.@e)
        {
          throw tmp220.E!;
        }
        throw new TApplicationException(TApplicationException.ExceptionType.MissingResult, "RowsSet_GetRowsAsync failed: unknown result");
      }

      public async global::System.Threading.Tasks.Task<List<string>> RowsSet_GetUniqueKeyAsync(int object_handle, CancellationToken cancellationToken = default)
      {
        await send_RowsSet_GetUniqueKeyAsync(object_handle, cancellationToken);
        return await recv_RowsSet_GetUniqueKeyAsync(cancellationToken);
      }

      public async global::System.Threading.Tasks.Task send_RowsSet_GetUniqueKeyAsync(int object_handle, CancellationToken cancellationToken = default)
      {
        await OutputProtocol.WriteMessageBeginAsync(new TMessage("RowsSet_GetUniqueKey", TMessageType.Call, SeqId), cancellationToken);
        
        var tmp221 = new InternalStructs.RowsSet_GetUniqueKey_args() {
          ObjectHandle = object_handle,
        };
        
        await tmp221.WriteAsync(OutputProtocol, cancellationToken);
        await OutputProtocol.WriteMessageEndAsync(cancellationToken);
        await OutputProtocol.Transport.FlushAsync(cancellationToken);
      }

      public async global::System.Threading.Tasks.Task<List<string>> recv_RowsSet_GetUniqueKeyAsync(CancellationToken cancellationToken = default)
      {
        
        var tmp222 = await InputProtocol.ReadMessageBeginAsync(cancellationToken);
        if (tmp222.Type == TMessageType.Exception)
        {
          var tmp223 = await TApplicationException.ReadAsync(InputProtocol, cancellationToken);
          await InputProtocol.ReadMessageEndAsync(cancellationToken);
          throw tmp223;
        }

        var tmp224 = new InternalStructs.RowsSet_GetUniqueKey_result();
        await tmp224.ReadAsync(InputProtocol, cancellationToken);
        await InputProtocol.ReadMessageEndAsync(cancellationToken);
        if (tmp224.__isset.success)
        {
          return tmp224.Success!;
        }
        if (tmp224.__isset.@e)
        {
          throw tmp224.E!;
        }
        throw new TApplicationException(TApplicationException.ExceptionType.MissingResult, "RowsSet_GetUniqueKeyAsync failed: unknown result");
      }

      public async global::System.Threading.Tasks.Task<List<global::QueryCat.Plugins.Sdk.KeyColumn>> RowsSet_GetKeyColumnsAsync(int object_handle, CancellationToken cancellationToken = default)
      {
        await send_RowsSet_GetKeyColumnsAsync(object_handle, cancellationToken);
        return await recv_RowsSet_GetKeyColumnsAsync(cancellationToken);
      }

      public async global::System.Threading.Tasks.Task send_RowsSet_GetKeyColumnsAsync(int object_handle, CancellationToken cancellationToken = default)
      {
        await OutputProtocol.WriteMessageBeginAsync(new TMessage("RowsSet_GetKeyColumns", TMessageType.Call, SeqId), cancellationToken);
        
        var tmp225 = new InternalStructs.RowsSet_GetKeyColumns_args() {
          ObjectHandle = object_handle,
        };
        
        await tmp225.WriteAsync(OutputProtocol, cancellationToken);
        await OutputProtocol.WriteMessageEndAsync(cancellationToken);
        await OutputProtocol.Transport.FlushAsync(cancellationToken);
      }

      public async global::System.Threading.Tasks.Task<List<global::QueryCat.Plugins.Sdk.KeyColumn>> recv_RowsSet_GetKeyColumnsAsync(CancellationToken cancellationToken = default)
      {
        
        var tmp226 = await InputProtocol.ReadMessageBeginAsync(cancellationToken);
        if (tmp226.Type == TMessageType.Exception)
        {
          var tmp227 = await TApplicationException.ReadAsync(InputProtocol, cancellationToken);
          await InputProtocol.ReadMessageEndAsync(cancellationToken);
          throw tmp227;
        }

        var tmp228 = new InternalStructs.RowsSet_GetKeyColumns_result();
        await tmp228.ReadAsync(InputProtocol, cancellationToken);
        await InputProtocol.ReadMessageEndAsync(cancellationToken);
        if (tmp228.__isset.success)
        {
          return tmp228.Success!;
        }
        throw new TApplicationException(TApplicationException.ExceptionType.MissingResult, "RowsSet_GetKeyColumnsAsync failed: unknown result");
      }

      public async global::System.Threading.Tasks.Task RowsSet_SetKeyColumnValueAsync(int object_handle, int column_index, string @operation, global::QueryCat.Plugins.Sdk.VariantValue? @value, CancellationToken cancellationToken = default)
      {
        await send_RowsSet_SetKeyColumnValueAsync(object_handle, column_index, @operation, @value, cancellationToken);
        await recv_RowsSet_SetKeyColumnValueAsync(cancellationToken);
      }

      public async global::System.Threading.Tasks.Task send_RowsSet_SetKeyColumnValueAsync(int object_handle, int column_index, string @operation, global::QueryCat.Plugins.Sdk.VariantValue? @value, CancellationToken cancellationToken = default)
      {
        await OutputProtocol.WriteMessageBeginAsync(new TMessage("RowsSet_SetKeyColumnValue", TMessageType.Call, SeqId), cancellationToken);
        
        var tmp229 = new InternalStructs.RowsSet_SetKeyColumnValue_args() {
          ObjectHandle = object_handle,
          ColumnIndex = column_index,
          Operation = @operation,
          Value = @value,
        };
        
        await tmp229.WriteAsync(OutputProtocol, cancellationToken);
        await OutputProtocol.WriteMessageEndAsync(cancellationToken);
        await OutputProtocol.Transport.FlushAsync(cancellationToken);
      }

      public async global::System.Threading.Tasks.Task recv_RowsSet_SetKeyColumnValueAsync(CancellationToken cancellationToken = default)
      {
        
        var tmp230 = await InputProtocol.ReadMessageBeginAsync(cancellationToken);
        if (tmp230.Type == TMessageType.Exception)
        {
          var tmp231 = await TApplicationException.ReadAsync(InputProtocol, cancellationToken);
          await InputProtocol.ReadMessageEndAsync(cancellationToken);
          throw tmp231;
        }

        var tmp232 = new InternalStructs.RowsSet_SetKeyColumnValue_result();
        await tmp232.ReadAsync(InputProtocol, cancellationToken);
        await InputProtocol.ReadMessageEndAsync(cancellationToken);
      }

      public async global::System.Threading.Tasks.Task<bool> RowsSet_UpdateValueAsync(int object_handle, int column_index, global::QueryCat.Plugins.Sdk.VariantValue? @value, CancellationToken cancellationToken = default)
      {
        await send_RowsSet_UpdateValueAsync(object_handle, column_index, @value, cancellationToken);
        return await recv_RowsSet_UpdateValueAsync(cancellationToken);
      }

      public async global::System.Threading.Tasks.Task send_RowsSet_UpdateValueAsync(int object_handle, int column_index, global::QueryCat.Plugins.Sdk.VariantValue? @value, CancellationToken cancellationToken = default)
      {
        await OutputProtocol.WriteMessageBeginAsync(new TMessage("RowsSet_UpdateValue", TMessageType.Call, SeqId), cancellationToken);
        
        var tmp233 = new InternalStructs.RowsSet_UpdateValue_args() {
          ObjectHandle = object_handle,
          ColumnIndex = column_index,
          Value = @value,
        };
        
        await tmp233.WriteAsync(OutputProtocol, cancellationToken);
        await OutputProtocol.WriteMessageEndAsync(cancellationToken);
        await OutputProtocol.Transport.FlushAsync(cancellationToken);
      }

      public async global::System.Threading.Tasks.Task<bool> recv_RowsSet_UpdateValueAsync(CancellationToken cancellationToken = default)
      {
        
        var tmp234 = await InputProtocol.ReadMessageBeginAsync(cancellationToken);
        if (tmp234.Type == TMessageType.Exception)
        {
          var tmp235 = await TApplicationException.ReadAsync(InputProtocol, cancellationToken);
          await InputProtocol.ReadMessageEndAsync(cancellationToken);
          throw tmp235;
        }

        var tmp236 = new InternalStructs.RowsSet_UpdateValue_result();
        await tmp236.ReadAsync(InputProtocol, cancellationToken);
        await InputProtocol.ReadMessageEndAsync(cancellationToken);
        if (tmp236.__isset.success)
        {
          return tmp236.Success;
        }
        if (tmp236.__isset.@e)
        {
          throw tmp236.E!;
        }
        throw new TApplicationException(TApplicationException.ExceptionType.MissingResult, "RowsSet_UpdateValueAsync failed: unknown result");
      }

      public async global::System.Threading.Tasks.Task RowsSet_WriteValueAsync(int object_handle, List<global::QueryCat.Plugins.Sdk.VariantValue>? @values, CancellationToken cancellationToken = default)
      {
        await send_RowsSet_WriteValueAsync(object_handle, @values, cancellationToken);
        await recv_RowsSet_WriteValueAsync(cancellationToken);
      }

      public async global::System.Threading.Tasks.Task send_RowsSet_WriteValueAsync(int object_handle, List<global::QueryCat.Plugins.Sdk.VariantValue>? @values, CancellationToken cancellationToken = default)
      {
        await OutputProtocol.WriteMessageBeginAsync(new TMessage("RowsSet_WriteValue", TMessageType.Call, SeqId), cancellationToken);
        
        var tmp237 = new InternalStructs.RowsSet_WriteValue_args() {
          ObjectHandle = object_handle,
          Values = @values,
        };
        
        await tmp237.WriteAsync(OutputProtocol, cancellationToken);
        await OutputProtocol.WriteMessageEndAsync(cancellationToken);
        await OutputProtocol.Transport.FlushAsync(cancellationToken);
      }

      public async global::System.Threading.Tasks.Task recv_RowsSet_WriteValueAsync(CancellationToken cancellationToken = default)
      {
        
        var tmp238 = await InputProtocol.ReadMessageBeginAsync(cancellationToken);
        if (tmp238.Type == TMessageType.Exception)
        {
          var tmp239 = await TApplicationException.ReadAsync(InputProtocol, cancellationToken);
          await InputProtocol.ReadMessageEndAsync(cancellationToken);
          throw tmp239;
        }

        var tmp240 = new InternalStructs.RowsSet_WriteValue_result();
        await tmp240.ReadAsync(InputProtocol, cancellationToken);
        await InputProtocol.ReadMessageEndAsync(cancellationToken);
        if (tmp240.__isset.@e)
        {
          throw tmp240.E!;
        }
      }

      public async global::System.Threading.Tasks.Task<byte[]> Blob_ReadAsync(int object_handle, int @offset, int @count, CancellationToken cancellationToken = default)
      {
        await send_Blob_ReadAsync(object_handle, @offset, @count, cancellationToken);
        return await recv_Blob_ReadAsync(cancellationToken);
      }

      public async global::System.Threading.Tasks.Task send_Blob_ReadAsync(int object_handle, int @offset, int @count, CancellationToken cancellationToken = default)
      {
        await OutputProtocol.WriteMessageBeginAsync(new TMessage("Blob_Read", TMessageType.Call, SeqId), cancellationToken);
        
        var tmp241 = new InternalStructs.Blob_Read_args() {
          ObjectHandle = object_handle,
          Offset = @offset,
          Count = @count,
        };
        
        await tmp241.WriteAsync(OutputProtocol, cancellationToken);
        await OutputProtocol.WriteMessageEndAsync(cancellationToken);
        await OutputProtocol.Transport.FlushAsync(cancellationToken);
      }

      public async global::System.Threading.Tasks.Task<byte[]> recv_Blob_ReadAsync(CancellationToken cancellationToken = default)
      {
        
        var tmp242 = await InputProtocol.ReadMessageBeginAsync(cancellationToken);
        if (tmp242.Type == TMessageType.Exception)
        {
          var tmp243 = await TApplicationException.ReadAsync(InputProtocol, cancellationToken);
          await InputProtocol.ReadMessageEndAsync(cancellationToken);
          throw tmp243;
        }

        var tmp244 = new InternalStructs.Blob_Read_result();
        await tmp244.ReadAsync(InputProtocol, cancellationToken);
        await InputProtocol.ReadMessageEndAsync(cancellationToken);
        if (tmp244.__isset.success)
        {
          return tmp244.Success!;
        }
        if (tmp244.__isset.@e)
        {
          throw tmp244.E!;
        }
        throw new TApplicationException(TApplicationException.ExceptionType.MissingResult, "Blob_ReadAsync failed: unknown result");
      }

      public async global::System.Threading.Tasks.Task<long> Blob_GetLengthAsync(int object_handle, CancellationToken cancellationToken = default)
      {
        await send_Blob_GetLengthAsync(object_handle, cancellationToken);
        return await recv_Blob_GetLengthAsync(cancellationToken);
      }

      public async global::System.Threading.Tasks.Task send_Blob_GetLengthAsync(int object_handle, CancellationToken cancellationToken = default)
      {
        await OutputProtocol.WriteMessageBeginAsync(new TMessage("Blob_GetLength", TMessageType.Call, SeqId), cancellationToken);
        
        var tmp245 = new InternalStructs.Blob_GetLength_args() {
          ObjectHandle = object_handle,
        };
        
        await tmp245.WriteAsync(OutputProtocol, cancellationToken);
        await OutputProtocol.WriteMessageEndAsync(cancellationToken);
        await OutputProtocol.Transport.FlushAsync(cancellationToken);
      }

      public async global::System.Threading.Tasks.Task<long> recv_Blob_GetLengthAsync(CancellationToken cancellationToken = default)
      {
        
        var tmp246 = await InputProtocol.ReadMessageBeginAsync(cancellationToken);
        if (tmp246.Type == TMessageType.Exception)
        {
          var tmp247 = await TApplicationException.ReadAsync(InputProtocol, cancellationToken);
          await InputProtocol.ReadMessageEndAsync(cancellationToken);
          throw tmp247;
        }

        var tmp248 = new InternalStructs.Blob_GetLength_result();
        await tmp248.ReadAsync(InputProtocol, cancellationToken);
        await InputProtocol.ReadMessageEndAsync(cancellationToken);
        if (tmp248.__isset.success)
        {
          return tmp248.Success;
        }
        if (tmp248.__isset.@e)
        {
          throw tmp248.E!;
        }
        throw new TApplicationException(TApplicationException.ExceptionType.MissingResult, "Blob_GetLengthAsync failed: unknown result");
      }

    }

    public class AsyncProcessor : ITAsyncProcessor
    {
      private readonly IAsync _iAsync;
      private readonly ILogger<AsyncProcessor>? _logger;

      public AsyncProcessor(IAsync iAsync, ILogger<AsyncProcessor>? logger = default)
      {
        _iAsync = iAsync ?? throw new ArgumentNullException(nameof(iAsync));
        _logger = logger;
        processMap_["CallFunction"] = CallFunction_ProcessAsync;
        processMap_["Initialize"] = Initialize_ProcessAsync;
        processMap_["Shutdown"] = Shutdown_ProcessAsync;
        processMap_["RowsSet_GetColumns"] = RowsSet_GetColumns_ProcessAsync;
        processMap_["RowsSet_Open"] = RowsSet_Open_ProcessAsync;
        processMap_["RowsSet_Close"] = RowsSet_Close_ProcessAsync;
        processMap_["RowsSet_Reset"] = RowsSet_Reset_ProcessAsync;
        processMap_["RowsSet_SetContext"] = RowsSet_SetContext_ProcessAsync;
        processMap_["RowsSet_GetRows"] = RowsSet_GetRows_ProcessAsync;
        processMap_["RowsSet_GetUniqueKey"] = RowsSet_GetUniqueKey_ProcessAsync;
        processMap_["RowsSet_GetKeyColumns"] = RowsSet_GetKeyColumns_ProcessAsync;
        processMap_["RowsSet_SetKeyColumnValue"] = RowsSet_SetKeyColumnValue_ProcessAsync;
        processMap_["RowsSet_UpdateValue"] = RowsSet_UpdateValue_ProcessAsync;
        processMap_["RowsSet_WriteValue"] = RowsSet_WriteValue_ProcessAsync;
        processMap_["Blob_Read"] = Blob_Read_ProcessAsync;
        processMap_["Blob_GetLength"] = Blob_GetLength_ProcessAsync;
      }

      protected delegate global::System.Threading.Tasks.Task ProcessFunction(int seqid, TProtocol iprot, TProtocol oprot, CancellationToken cancellationToken);
      protected Dictionary<string, ProcessFunction> processMap_ = new();

      public async Task<bool> ProcessAsync(TProtocol iprot, TProtocol oprot)
      {
        return await ProcessAsync(iprot, oprot, CancellationToken.None);
      }

      public async Task<bool> ProcessAsync(TProtocol iprot, TProtocol oprot, CancellationToken cancellationToken)
      {
        try
        {
          var msg = await iprot.ReadMessageBeginAsync(cancellationToken);

          processMap_.TryGetValue(msg.Name, out var fn);

          if (fn == null)
          {
            await TProtocolUtil.SkipAsync(iprot, TType.Struct, cancellationToken);
            await iprot.ReadMessageEndAsync(cancellationToken);
            var x = new TApplicationException (TApplicationException.ExceptionType.UnknownMethod, "Invalid method name: '" + msg.Name + "'");
            await oprot.WriteMessageBeginAsync(new TMessage(msg.Name, TMessageType.Exception, msg.SeqID), cancellationToken);
            await x.WriteAsync(oprot, cancellationToken);
            await oprot.WriteMessageEndAsync(cancellationToken);
            await oprot.Transport.FlushAsync(cancellationToken);
            return true;
          }

          await fn(msg.SeqID, iprot, oprot, cancellationToken);

        }
        catch (IOException)
        {
          return false;
        }

        return true;
      }

      public async global::System.Threading.Tasks.Task CallFunction_ProcessAsync(int seqid, TProtocol iprot, TProtocol oprot, CancellationToken cancellationToken)
      {
        var tmp249 = new InternalStructs.CallFunction_args();
        await tmp249.ReadAsync(iprot, cancellationToken);
        await iprot.ReadMessageEndAsync(cancellationToken);
        var tmp250 = new InternalStructs.CallFunction_result();
        try
        {
          try
          {
            tmp250.Success = await _iAsync.CallFunctionAsync(tmp249.FunctionName, tmp249.Args, tmp249.ObjectHandle, cancellationToken);
          }
          catch (global::QueryCat.Plugins.Sdk.QueryCatPluginException tmp251)
          {
            tmp250.E = tmp251;
          }
          await oprot.WriteMessageBeginAsync(new TMessage("CallFunction", TMessageType.Reply, seqid), cancellationToken); 
          await tmp250.WriteAsync(oprot, cancellationToken);
        }
        catch (TTransportException)
        {
          throw;
        }
        catch (Exception tmp252)
        {
          var tmp253 = $"Error occurred in {GetType().FullName}: {tmp252.Message}";
          if(_logger != null)
            _logger.LogError("{Exception}, {Message}", tmp252, tmp253);
          else
            Console.Error.WriteLine(tmp253);
          var tmp254 = new TApplicationException(TApplicationException.ExceptionType.InternalError," Internal error.");
          await oprot.WriteMessageBeginAsync(new TMessage("CallFunction", TMessageType.Exception, seqid), cancellationToken);
          await tmp254.WriteAsync(oprot, cancellationToken);
        }
        await oprot.WriteMessageEndAsync(cancellationToken);
        await oprot.Transport.FlushAsync(cancellationToken);
      }

      public async global::System.Threading.Tasks.Task Initialize_ProcessAsync(int seqid, TProtocol iprot, TProtocol oprot, CancellationToken cancellationToken)
      {
        var tmp255 = new InternalStructs.Initialize_args();
        await tmp255.ReadAsync(iprot, cancellationToken);
        await iprot.ReadMessageEndAsync(cancellationToken);
        var tmp256 = new InternalStructs.Initialize_result();
        try
        {
          try
          {
            await _iAsync.InitializeAsync(cancellationToken);
          }
          catch (global::QueryCat.Plugins.Sdk.QueryCatPluginException tmp257)
          {
            tmp256.E = tmp257;
          }
          await oprot.WriteMessageBeginAsync(new TMessage("Initialize", TMessageType.Reply, seqid), cancellationToken); 
          await tmp256.WriteAsync(oprot, cancellationToken);
        }
        catch (TTransportException)
        {
          throw;
        }
        catch (Exception tmp258)
        {
          var tmp259 = $"Error occurred in {GetType().FullName}: {tmp258.Message}";
          if(_logger != null)
            _logger.LogError("{Exception}, {Message}", tmp258, tmp259);
          else
            Console.Error.WriteLine(tmp259);
          var tmp260 = new TApplicationException(TApplicationException.ExceptionType.InternalError," Internal error.");
          await oprot.WriteMessageBeginAsync(new TMessage("Initialize", TMessageType.Exception, seqid), cancellationToken);
          await tmp260.WriteAsync(oprot, cancellationToken);
        }
        await oprot.WriteMessageEndAsync(cancellationToken);
        await oprot.Transport.FlushAsync(cancellationToken);
      }

      public async global::System.Threading.Tasks.Task Shutdown_ProcessAsync(int seqid, TProtocol iprot, TProtocol oprot, CancellationToken cancellationToken)
      {
        var tmp261 = new InternalStructs.Shutdown_args();
        await tmp261.ReadAsync(iprot, cancellationToken);
        await iprot.ReadMessageEndAsync(cancellationToken);
        var tmp262 = new InternalStructs.Shutdown_result();
        try
        {
          try
          {
            await _iAsync.ShutdownAsync(cancellationToken);
          }
          catch (global::QueryCat.Plugins.Sdk.QueryCatPluginException tmp263)
          {
            tmp262.E = tmp263;
          }
          await oprot.WriteMessageBeginAsync(new TMessage("Shutdown", TMessageType.Reply, seqid), cancellationToken); 
          await tmp262.WriteAsync(oprot, cancellationToken);
        }
        catch (TTransportException)
        {
          throw;
        }
        catch (Exception tmp264)
        {
          var tmp265 = $"Error occurred in {GetType().FullName}: {tmp264.Message}";
          if(_logger != null)
            _logger.LogError("{Exception}, {Message}", tmp264, tmp265);
          else
            Console.Error.WriteLine(tmp265);
          var tmp266 = new TApplicationException(TApplicationException.ExceptionType.InternalError," Internal error.");
          await oprot.WriteMessageBeginAsync(new TMessage("Shutdown", TMessageType.Exception, seqid), cancellationToken);
          await tmp266.WriteAsync(oprot, cancellationToken);
        }
        await oprot.WriteMessageEndAsync(cancellationToken);
        await oprot.Transport.FlushAsync(cancellationToken);
      }

      public async global::System.Threading.Tasks.Task RowsSet_GetColumns_ProcessAsync(int seqid, TProtocol iprot, TProtocol oprot, CancellationToken cancellationToken)
      {
        var tmp267 = new InternalStructs.RowsSet_GetColumns_args();
        await tmp267.ReadAsync(iprot, cancellationToken);
        await iprot.ReadMessageEndAsync(cancellationToken);
        var tmp268 = new InternalStructs.RowsSet_GetColumns_result();
        try
        {
          try
          {
            tmp268.Success = await _iAsync.RowsSet_GetColumnsAsync(tmp267.ObjectHandle, cancellationToken);
          }
          catch (global::QueryCat.Plugins.Sdk.QueryCatPluginException tmp269)
          {
            tmp268.E = tmp269;
          }
          await oprot.WriteMessageBeginAsync(new TMessage("RowsSet_GetColumns", TMessageType.Reply, seqid), cancellationToken); 
          await tmp268.WriteAsync(oprot, cancellationToken);
        }
        catch (TTransportException)
        {
          throw;
        }
        catch (Exception tmp270)
        {
          var tmp271 = $"Error occurred in {GetType().FullName}: {tmp270.Message}";
          if(_logger != null)
            _logger.LogError("{Exception}, {Message}", tmp270, tmp271);
          else
            Console.Error.WriteLine(tmp271);
          var tmp272 = new TApplicationException(TApplicationException.ExceptionType.InternalError," Internal error.");
          await oprot.WriteMessageBeginAsync(new TMessage("RowsSet_GetColumns", TMessageType.Exception, seqid), cancellationToken);
          await tmp272.WriteAsync(oprot, cancellationToken);
        }
        await oprot.WriteMessageEndAsync(cancellationToken);
        await oprot.Transport.FlushAsync(cancellationToken);
      }

      public async global::System.Threading.Tasks.Task RowsSet_Open_ProcessAsync(int seqid, TProtocol iprot, TProtocol oprot, CancellationToken cancellationToken)
      {
        var tmp273 = new InternalStructs.RowsSet_Open_args();
        await tmp273.ReadAsync(iprot, cancellationToken);
        await iprot.ReadMessageEndAsync(cancellationToken);
        var tmp274 = new InternalStructs.RowsSet_Open_result();
        try
        {
          try
          {
            await _iAsync.RowsSet_OpenAsync(tmp273.ObjectHandle, cancellationToken);
          }
          catch (global::QueryCat.Plugins.Sdk.QueryCatPluginException tmp275)
          {
            tmp274.E = tmp275;
          }
          await oprot.WriteMessageBeginAsync(new TMessage("RowsSet_Open", TMessageType.Reply, seqid), cancellationToken); 
          await tmp274.WriteAsync(oprot, cancellationToken);
        }
        catch (TTransportException)
        {
          throw;
        }
        catch (Exception tmp276)
        {
          var tmp277 = $"Error occurred in {GetType().FullName}: {tmp276.Message}";
          if(_logger != null)
            _logger.LogError("{Exception}, {Message}", tmp276, tmp277);
          else
            Console.Error.WriteLine(tmp277);
          var tmp278 = new TApplicationException(TApplicationException.ExceptionType.InternalError," Internal error.");
          await oprot.WriteMessageBeginAsync(new TMessage("RowsSet_Open", TMessageType.Exception, seqid), cancellationToken);
          await tmp278.WriteAsync(oprot, cancellationToken);
        }
        await oprot.WriteMessageEndAsync(cancellationToken);
        await oprot.Transport.FlushAsync(cancellationToken);
      }

      public async global::System.Threading.Tasks.Task RowsSet_Close_ProcessAsync(int seqid, TProtocol iprot, TProtocol oprot, CancellationToken cancellationToken)
      {
        var tmp279 = new InternalStructs.RowsSet_Close_args();
        await tmp279.ReadAsync(iprot, cancellationToken);
        await iprot.ReadMessageEndAsync(cancellationToken);
        var tmp280 = new InternalStructs.RowsSet_Close_result();
        try
        {
          try
          {
            await _iAsync.RowsSet_CloseAsync(tmp279.ObjectHandle, cancellationToken);
          }
          catch (global::QueryCat.Plugins.Sdk.QueryCatPluginException tmp281)
          {
            tmp280.E = tmp281;
          }
          await oprot.WriteMessageBeginAsync(new TMessage("RowsSet_Close", TMessageType.Reply, seqid), cancellationToken); 
          await tmp280.WriteAsync(oprot, cancellationToken);
        }
        catch (TTransportException)
        {
          throw;
        }
        catch (Exception tmp282)
        {
          var tmp283 = $"Error occurred in {GetType().FullName}: {tmp282.Message}";
          if(_logger != null)
            _logger.LogError("{Exception}, {Message}", tmp282, tmp283);
          else
            Console.Error.WriteLine(tmp283);
          var tmp284 = new TApplicationException(TApplicationException.ExceptionType.InternalError," Internal error.");
          await oprot.WriteMessageBeginAsync(new TMessage("RowsSet_Close", TMessageType.Exception, seqid), cancellationToken);
          await tmp284.WriteAsync(oprot, cancellationToken);
        }
        await oprot.WriteMessageEndAsync(cancellationToken);
        await oprot.Transport.FlushAsync(cancellationToken);
      }

      public async global::System.Threading.Tasks.Task RowsSet_Reset_ProcessAsync(int seqid, TProtocol iprot, TProtocol oprot, CancellationToken cancellationToken)
      {
        var tmp285 = new InternalStructs.RowsSet_Reset_args();
        await tmp285.ReadAsync(iprot, cancellationToken);
        await iprot.ReadMessageEndAsync(cancellationToken);
        var tmp286 = new InternalStructs.RowsSet_Reset_result();
        try
        {
          try
          {
            await _iAsync.RowsSet_ResetAsync(tmp285.ObjectHandle, cancellationToken);
          }
          catch (global::QueryCat.Plugins.Sdk.QueryCatPluginException tmp287)
          {
            tmp286.E = tmp287;
          }
          await oprot.WriteMessageBeginAsync(new TMessage("RowsSet_Reset", TMessageType.Reply, seqid), cancellationToken); 
          await tmp286.WriteAsync(oprot, cancellationToken);
        }
        catch (TTransportException)
        {
          throw;
        }
        catch (Exception tmp288)
        {
          var tmp289 = $"Error occurred in {GetType().FullName}: {tmp288.Message}";
          if(_logger != null)
            _logger.LogError("{Exception}, {Message}", tmp288, tmp289);
          else
            Console.Error.WriteLine(tmp289);
          var tmp290 = new TApplicationException(TApplicationException.ExceptionType.InternalError," Internal error.");
          await oprot.WriteMessageBeginAsync(new TMessage("RowsSet_Reset", TMessageType.Exception, seqid), cancellationToken);
          await tmp290.WriteAsync(oprot, cancellationToken);
        }
        await oprot.WriteMessageEndAsync(cancellationToken);
        await oprot.Transport.FlushAsync(cancellationToken);
      }

      public async global::System.Threading.Tasks.Task RowsSet_SetContext_ProcessAsync(int seqid, TProtocol iprot, TProtocol oprot, CancellationToken cancellationToken)
      {
        var tmp291 = new InternalStructs.RowsSet_SetContext_args();
        await tmp291.ReadAsync(iprot, cancellationToken);
        await iprot.ReadMessageEndAsync(cancellationToken);
        var tmp292 = new InternalStructs.RowsSet_SetContext_result();
        try
        {
          try
          {
            await _iAsync.RowsSet_SetContextAsync(tmp291.ObjectHandle, tmp291.ContextQueryInfo, cancellationToken);
          }
          catch (global::QueryCat.Plugins.Sdk.QueryCatPluginException tmp293)
          {
            tmp292.E = tmp293;
          }
          await oprot.WriteMessageBeginAsync(new TMessage("RowsSet_SetContext", TMessageType.Reply, seqid), cancellationToken); 
          await tmp292.WriteAsync(oprot, cancellationToken);
        }
        catch (TTransportException)
        {
          throw;
        }
        catch (Exception tmp294)
        {
          var tmp295 = $"Error occurred in {GetType().FullName}: {tmp294.Message}";
          if(_logger != null)
            _logger.LogError("{Exception}, {Message}", tmp294, tmp295);
          else
            Console.Error.WriteLine(tmp295);
          var tmp296 = new TApplicationException(TApplicationException.ExceptionType.InternalError," Internal error.");
          await oprot.WriteMessageBeginAsync(new TMessage("RowsSet_SetContext", TMessageType.Exception, seqid), cancellationToken);
          await tmp296.WriteAsync(oprot, cancellationToken);
        }
        await oprot.WriteMessageEndAsync(cancellationToken);
        await oprot.Transport.FlushAsync(cancellationToken);
      }

      public async global::System.Threading.Tasks.Task RowsSet_GetRows_ProcessAsync(int seqid, TProtocol iprot, TProtocol oprot, CancellationToken cancellationToken)
      {
        var tmp297 = new InternalStructs.RowsSet_GetRows_args();
        await tmp297.ReadAsync(iprot, cancellationToken);
        await iprot.ReadMessageEndAsync(cancellationToken);
        var tmp298 = new InternalStructs.RowsSet_GetRows_result();
        try
        {
          try
          {
            tmp298.Success = await _iAsync.RowsSet_GetRowsAsync(tmp297.ObjectHandle, tmp297.Count, cancellationToken);
          }
          catch (global::QueryCat.Plugins.Sdk.QueryCatPluginException tmp299)
          {
            tmp298.E = tmp299;
          }
          await oprot.WriteMessageBeginAsync(new TMessage("RowsSet_GetRows", TMessageType.Reply, seqid), cancellationToken); 
          await tmp298.WriteAsync(oprot, cancellationToken);
        }
        catch (TTransportException)
        {
          throw;
        }
        catch (Exception tmp300)
        {
          var tmp301 = $"Error occurred in {GetType().FullName}: {tmp300.Message}";
          if(_logger != null)
            _logger.LogError("{Exception}, {Message}", tmp300, tmp301);
          else
            Console.Error.WriteLine(tmp301);
          var tmp302 = new TApplicationException(TApplicationException.ExceptionType.InternalError," Internal error.");
          await oprot.WriteMessageBeginAsync(new TMessage("RowsSet_GetRows", TMessageType.Exception, seqid), cancellationToken);
          await tmp302.WriteAsync(oprot, cancellationToken);
        }
        await oprot.WriteMessageEndAsync(cancellationToken);
        await oprot.Transport.FlushAsync(cancellationToken);
      }

      public async global::System.Threading.Tasks.Task RowsSet_GetUniqueKey_ProcessAsync(int seqid, TProtocol iprot, TProtocol oprot, CancellationToken cancellationToken)
      {
        var tmp303 = new InternalStructs.RowsSet_GetUniqueKey_args();
        await tmp303.ReadAsync(iprot, cancellationToken);
        await iprot.ReadMessageEndAsync(cancellationToken);
        var tmp304 = new InternalStructs.RowsSet_GetUniqueKey_result();
        try
        {
          try
          {
            tmp304.Success = await _iAsync.RowsSet_GetUniqueKeyAsync(tmp303.ObjectHandle, cancellationToken);
          }
          catch (global::QueryCat.Plugins.Sdk.QueryCatPluginException tmp305)
          {
            tmp304.E = tmp305;
          }
          await oprot.WriteMessageBeginAsync(new TMessage("RowsSet_GetUniqueKey", TMessageType.Reply, seqid), cancellationToken); 
          await tmp304.WriteAsync(oprot, cancellationToken);
        }
        catch (TTransportException)
        {
          throw;
        }
        catch (Exception tmp306)
        {
          var tmp307 = $"Error occurred in {GetType().FullName}: {tmp306.Message}";
          if(_logger != null)
            _logger.LogError("{Exception}, {Message}", tmp306, tmp307);
          else
            Console.Error.WriteLine(tmp307);
          var tmp308 = new TApplicationException(TApplicationException.ExceptionType.InternalError," Internal error.");
          await oprot.WriteMessageBeginAsync(new TMessage("RowsSet_GetUniqueKey", TMessageType.Exception, seqid), cancellationToken);
          await tmp308.WriteAsync(oprot, cancellationToken);
        }
        await oprot.WriteMessageEndAsync(cancellationToken);
        await oprot.Transport.FlushAsync(cancellationToken);
      }

      public async global::System.Threading.Tasks.Task RowsSet_GetKeyColumns_ProcessAsync(int seqid, TProtocol iprot, TProtocol oprot, CancellationToken cancellationToken)
      {
        var tmp309 = new InternalStructs.RowsSet_GetKeyColumns_args();
        await tmp309.ReadAsync(iprot, cancellationToken);
        await iprot.ReadMessageEndAsync(cancellationToken);
        var tmp310 = new InternalStructs.RowsSet_GetKeyColumns_result();
        try
        {
          tmp310.Success = await _iAsync.RowsSet_GetKeyColumnsAsync(tmp309.ObjectHandle, cancellationToken);
          await oprot.WriteMessageBeginAsync(new TMessage("RowsSet_GetKeyColumns", TMessageType.Reply, seqid), cancellationToken); 
          await tmp310.WriteAsync(oprot, cancellationToken);
        }
        catch (TTransportException)
        {
          throw;
        }
        catch (Exception tmp311)
        {
          var tmp312 = $"Error occurred in {GetType().FullName}: {tmp311.Message}";
          if(_logger != null)
            _logger.LogError("{Exception}, {Message}", tmp311, tmp312);
          else
            Console.Error.WriteLine(tmp312);
          var tmp313 = new TApplicationException(TApplicationException.ExceptionType.InternalError," Internal error.");
          await oprot.WriteMessageBeginAsync(new TMessage("RowsSet_GetKeyColumns", TMessageType.Exception, seqid), cancellationToken);
          await tmp313.WriteAsync(oprot, cancellationToken);
        }
        await oprot.WriteMessageEndAsync(cancellationToken);
        await oprot.Transport.FlushAsync(cancellationToken);
      }

      public async global::System.Threading.Tasks.Task RowsSet_SetKeyColumnValue_ProcessAsync(int seqid, TProtocol iprot, TProtocol oprot, CancellationToken cancellationToken)
      {
        var tmp314 = new InternalStructs.RowsSet_SetKeyColumnValue_args();
        await tmp314.ReadAsync(iprot, cancellationToken);
        await iprot.ReadMessageEndAsync(cancellationToken);
        var tmp315 = new InternalStructs.RowsSet_SetKeyColumnValue_result();
        try
        {
          await _iAsync.RowsSet_SetKeyColumnValueAsync(tmp314.ObjectHandle, tmp314.ColumnIndex, tmp314.Operation, tmp314.Value, cancellationToken);
          await oprot.WriteMessageBeginAsync(new TMessage("RowsSet_SetKeyColumnValue", TMessageType.Reply, seqid), cancellationToken); 
          await tmp315.WriteAsync(oprot, cancellationToken);
        }
        catch (TTransportException)
        {
          throw;
        }
        catch (Exception tmp316)
        {
          var tmp317 = $"Error occurred in {GetType().FullName}: {tmp316.Message}";
          if(_logger != null)
            _logger.LogError("{Exception}, {Message}", tmp316, tmp317);
          else
            Console.Error.WriteLine(tmp317);
          var tmp318 = new TApplicationException(TApplicationException.ExceptionType.InternalError," Internal error.");
          await oprot.WriteMessageBeginAsync(new TMessage("RowsSet_SetKeyColumnValue", TMessageType.Exception, seqid), cancellationToken);
          await tmp318.WriteAsync(oprot, cancellationToken);
        }
        await oprot.WriteMessageEndAsync(cancellationToken);
        await oprot.Transport.FlushAsync(cancellationToken);
      }

      public async global::System.Threading.Tasks.Task RowsSet_UpdateValue_ProcessAsync(int seqid, TProtocol iprot, TProtocol oprot, CancellationToken cancellationToken)
      {
        var tmp319 = new InternalStructs.RowsSet_UpdateValue_args();
        await tmp319.ReadAsync(iprot, cancellationToken);
        await iprot.ReadMessageEndAsync(cancellationToken);
        var tmp320 = new InternalStructs.RowsSet_UpdateValue_result();
        try
        {
          try
          {
            tmp320.Success = await _iAsync.RowsSet_UpdateValueAsync(tmp319.ObjectHandle, tmp319.ColumnIndex, tmp319.Value, cancellationToken);
          }
          catch (global::QueryCat.Plugins.Sdk.QueryCatPluginException tmp321)
          {
            tmp320.E = tmp321;
          }
          await oprot.WriteMessageBeginAsync(new TMessage("RowsSet_UpdateValue", TMessageType.Reply, seqid), cancellationToken); 
          await tmp320.WriteAsync(oprot, cancellationToken);
        }
        catch (TTransportException)
        {
          throw;
        }
        catch (Exception tmp322)
        {
          var tmp323 = $"Error occurred in {GetType().FullName}: {tmp322.Message}";
          if(_logger != null)
            _logger.LogError("{Exception}, {Message}", tmp322, tmp323);
          else
            Console.Error.WriteLine(tmp323);
          var tmp324 = new TApplicationException(TApplicationException.ExceptionType.InternalError," Internal error.");
          await oprot.WriteMessageBeginAsync(new TMessage("RowsSet_UpdateValue", TMessageType.Exception, seqid), cancellationToken);
          await tmp324.WriteAsync(oprot, cancellationToken);
        }
        await oprot.WriteMessageEndAsync(cancellationToken);
        await oprot.Transport.FlushAsync(cancellationToken);
      }

      public async global::System.Threading.Tasks.Task RowsSet_WriteValue_ProcessAsync(int seqid, TProtocol iprot, TProtocol oprot, CancellationToken cancellationToken)
      {
        var tmp325 = new InternalStructs.RowsSet_WriteValue_args();
        await tmp325.ReadAsync(iprot, cancellationToken);
        await iprot.ReadMessageEndAsync(cancellationToken);
        var tmp326 = new InternalStructs.RowsSet_WriteValue_result();
        try
        {
          try
          {
            await _iAsync.RowsSet_WriteValueAsync(tmp325.ObjectHandle, tmp325.Values, cancellationToken);
          }
          catch (global::QueryCat.Plugins.Sdk.QueryCatPluginException tmp327)
          {
            tmp326.E = tmp327;
          }
          await oprot.WriteMessageBeginAsync(new TMessage("RowsSet_WriteValue", TMessageType.Reply, seqid), cancellationToken); 
          await tmp326.WriteAsync(oprot, cancellationToken);
        }
        catch (TTransportException)
        {
          throw;
        }
        catch (Exception tmp328)
        {
          var tmp329 = $"Error occurred in {GetType().FullName}: {tmp328.Message}";
          if(_logger != null)
            _logger.LogError("{Exception}, {Message}", tmp328, tmp329);
          else
            Console.Error.WriteLine(tmp329);
          var tmp330 = new TApplicationException(TApplicationException.ExceptionType.InternalError," Internal error.");
          await oprot.WriteMessageBeginAsync(new TMessage("RowsSet_WriteValue", TMessageType.Exception, seqid), cancellationToken);
          await tmp330.WriteAsync(oprot, cancellationToken);
        }
        await oprot.WriteMessageEndAsync(cancellationToken);
        await oprot.Transport.FlushAsync(cancellationToken);
      }

      public async global::System.Threading.Tasks.Task Blob_Read_ProcessAsync(int seqid, TProtocol iprot, TProtocol oprot, CancellationToken cancellationToken)
      {
        var tmp331 = new InternalStructs.Blob_Read_args();
        await tmp331.ReadAsync(iprot, cancellationToken);
        await iprot.ReadMessageEndAsync(cancellationToken);
        var tmp332 = new InternalStructs.Blob_Read_result();
        try
        {
          try
          {
            tmp332.Success = await _iAsync.Blob_ReadAsync(tmp331.ObjectHandle, tmp331.Offset, tmp331.Count, cancellationToken);
          }
          catch (global::QueryCat.Plugins.Sdk.QueryCatPluginException tmp333)
          {
            tmp332.E = tmp333;
          }
          await oprot.WriteMessageBeginAsync(new TMessage("Blob_Read", TMessageType.Reply, seqid), cancellationToken); 
          await tmp332.WriteAsync(oprot, cancellationToken);
        }
        catch (TTransportException)
        {
          throw;
        }
        catch (Exception tmp334)
        {
          var tmp335 = $"Error occurred in {GetType().FullName}: {tmp334.Message}";
          if(_logger != null)
            _logger.LogError("{Exception}, {Message}", tmp334, tmp335);
          else
            Console.Error.WriteLine(tmp335);
          var tmp336 = new TApplicationException(TApplicationException.ExceptionType.InternalError," Internal error.");
          await oprot.WriteMessageBeginAsync(new TMessage("Blob_Read", TMessageType.Exception, seqid), cancellationToken);
          await tmp336.WriteAsync(oprot, cancellationToken);
        }
        await oprot.WriteMessageEndAsync(cancellationToken);
        await oprot.Transport.FlushAsync(cancellationToken);
      }

      public async global::System.Threading.Tasks.Task Blob_GetLength_ProcessAsync(int seqid, TProtocol iprot, TProtocol oprot, CancellationToken cancellationToken)
      {
        var tmp337 = new InternalStructs.Blob_GetLength_args();
        await tmp337.ReadAsync(iprot, cancellationToken);
        await iprot.ReadMessageEndAsync(cancellationToken);
        var tmp338 = new InternalStructs.Blob_GetLength_result();
        try
        {
          try
          {
            tmp338.Success = await _iAsync.Blob_GetLengthAsync(tmp337.ObjectHandle, cancellationToken);
          }
          catch (global::QueryCat.Plugins.Sdk.QueryCatPluginException tmp339)
          {
            tmp338.E = tmp339;
          }
          await oprot.WriteMessageBeginAsync(new TMessage("Blob_GetLength", TMessageType.Reply, seqid), cancellationToken); 
          await tmp338.WriteAsync(oprot, cancellationToken);
        }
        catch (TTransportException)
        {
          throw;
        }
        catch (Exception tmp340)
        {
          var tmp341 = $"Error occurred in {GetType().FullName}: {tmp340.Message}";
          if(_logger != null)
            _logger.LogError("{Exception}, {Message}", tmp340, tmp341);
          else
            Console.Error.WriteLine(tmp341);
          var tmp342 = new TApplicationException(TApplicationException.ExceptionType.InternalError," Internal error.");
          await oprot.WriteMessageBeginAsync(new TMessage("Blob_GetLength", TMessageType.Exception, seqid), cancellationToken);
          await tmp342.WriteAsync(oprot, cancellationToken);
        }
        await oprot.WriteMessageEndAsync(cancellationToken);
        await oprot.Transport.FlushAsync(cancellationToken);
      }

    }

    public class InternalStructs
    {

      public partial class CallFunction_args : TBase
      {
        private int _object_handle;

        public string FunctionName { get; set; } = string.Empty;

        public List<global::QueryCat.Plugins.Sdk.VariantValue>? Args { get; set; }

        public int ObjectHandle
        {
          get
          {
            return _object_handle;
          }
          set
          {
            __isset.object_handle = true;
            this._object_handle = value;
          }
        }


        public Isset __isset;
        public struct Isset
        {
          public bool object_handle;
        }

        public CallFunction_args()
        {
        }

        public CallFunction_args(string function_name, List<global::QueryCat.Plugins.Sdk.VariantValue>? @args) : this()
        {
          this.FunctionName = function_name;
          this.Args = @args;
        }

        public async global::System.Threading.Tasks.Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken)
        {
          iprot.IncrementRecursionDepth();
          try
          {
            bool isset_function_name = false;
            bool isset_args = false;
            TField field;
            await iprot.ReadStructBeginAsync(cancellationToken);
            while (true)
            {
              field = await iprot.ReadFieldBeginAsync(cancellationToken);
              if (field.Type == TType.Stop)
              {
                break;
              }

              switch (field.ID)
              {
                case 1:
                  if (field.Type == TType.String)
                  {
                    FunctionName = await iprot.ReadStringAsync(cancellationToken);
                    isset_function_name = true;
                  }
                  else
                  {
                    await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
                  }
                  break;
                case 2:
                  if (field.Type == TType.List)
                  {
                    {
                      var _list343 = await iprot.ReadListBeginAsync(cancellationToken);
                      Args = new List<global::QueryCat.Plugins.Sdk.VariantValue>(_list343.Count);
                      for(int _i344 = 0; _i344 < _list343.Count; ++_i344)
                      {
                        global::QueryCat.Plugins.Sdk.VariantValue _elem345;
                        _elem345 = new global::QueryCat.Plugins.Sdk.VariantValue();
                        await _elem345.ReadAsync(iprot, cancellationToken);
                        Args.Add(_elem345);
                      }
                      await iprot.ReadListEndAsync(cancellationToken);
                    }
                    isset_args = true;
                  }
                  else
                  {
                    await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
                  }
                  break;
                case 3:
                  if (field.Type == TType.I32)
                  {
                    ObjectHandle = await iprot.ReadI32Async(cancellationToken);
                  }
                  else
                  {
                    await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
                  }
                  break;
                default: 
                  await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
                  break;
              }

              await iprot.ReadFieldEndAsync(cancellationToken);
            }

            await iprot.ReadStructEndAsync(cancellationToken);
            if (!isset_function_name)
            {
              throw new TProtocolException(TProtocolException.INVALID_DATA);
            }
            if (!isset_args)
            {
              throw new TProtocolException(TProtocolException.INVALID_DATA);
            }
          }
          finally
          {
            iprot.DecrementRecursionDepth();
          }
        }

        public async global::System.Threading.Tasks.Task WriteAsync(TProtocol oprot, CancellationToken cancellationToken)
        {
          oprot.IncrementRecursionDepth();
          try
          {
            var tmp346 = new TStruct("CallFunction_args");
            await oprot.WriteStructBeginAsync(tmp346, cancellationToken);
            var tmp347 = new TField();
            if((FunctionName != null))
            {
              tmp347.Name = "function_name";
              tmp347.Type = TType.String;
              tmp347.ID = 1;
              await oprot.WriteFieldBeginAsync(tmp347, cancellationToken);
              await oprot.WriteStringAsync(FunctionName, cancellationToken);
              await oprot.WriteFieldEndAsync(cancellationToken);
            }
            if((Args != null))
            {
              tmp347.Name = "args";
              tmp347.Type = TType.List;
              tmp347.ID = 2;
              await oprot.WriteFieldBeginAsync(tmp347, cancellationToken);
              await oprot.WriteListBeginAsync(new TList(TType.Struct, Args.Count), cancellationToken);
              foreach (global::QueryCat.Plugins.Sdk.VariantValue _iter348 in Args)
              {
                await _iter348.WriteAsync(oprot, cancellationToken);
              }
              await oprot.WriteListEndAsync(cancellationToken);
              await oprot.WriteFieldEndAsync(cancellationToken);
            }
            if(__isset.object_handle)
            {
              tmp347.Name = "object_handle";
              tmp347.Type = TType.I32;
              tmp347.ID = 3;
              await oprot.WriteFieldBeginAsync(tmp347, cancellationToken);
              await oprot.WriteI32Async(ObjectHandle, cancellationToken);
              await oprot.WriteFieldEndAsync(cancellationToken);
            }
            await oprot.WriteFieldStopAsync(cancellationToken);
            await oprot.WriteStructEndAsync(cancellationToken);
          }
          finally
          {
            oprot.DecrementRecursionDepth();
          }
        }

        public override bool Equals(object? that)
        {
          if (that is not CallFunction_args other) return false;
          if (ReferenceEquals(this, other)) return true;
          return global::System.Object.Equals(FunctionName, other.FunctionName)
            && TCollections.Equals(Args, other.Args)
            && ((__isset.object_handle == other.__isset.object_handle) && ((!__isset.object_handle) || (global::System.Object.Equals(ObjectHandle, other.ObjectHandle))));
        }

        public override int GetHashCode() {
          int hashcode = 157;
          unchecked {
            if((FunctionName != null))
            {
              hashcode = (hashcode * 397) + FunctionName.GetHashCode();
            }
            if((Args != null))
            {
              hashcode = (hashcode * 397) + TCollections.GetHashCode(Args);
            }
            if(__isset.object_handle)
            {
              hashcode = (hashcode * 397) + ObjectHandle.GetHashCode();
            }
          }
          return hashcode;
        }

        public override string ToString()
        {
          var tmp349 = new StringBuilder("CallFunction_args(");
          if((FunctionName != null))
          {
            tmp349.Append(", FunctionName: ");
            FunctionName.ToString(tmp349);
          }
          if((Args != null))
          {
            tmp349.Append(", Args: ");
            Args.ToString(tmp349);
          }
          if(__isset.object_handle)
          {
            tmp349.Append(", ObjectHandle: ");
            ObjectHandle.ToString(tmp349);
          }
          tmp349.Append(')');
          return tmp349.ToString();
        }
      }


      public partial class CallFunction_result : TBase
      {
        private global::QueryCat.Plugins.Sdk.VariantValue? _success;
        private global::QueryCat.Plugins.Sdk.QueryCatPluginException? _e;

        public global::QueryCat.Plugins.Sdk.VariantValue? Success
        {
          get
          {
            return _success;
          }
          set
          {
            __isset.@success = true;
            this._success = value;
          }
        }

        public global::QueryCat.Plugins.Sdk.QueryCatPluginException? E
        {
          get
          {
            return _e;
          }
          set
          {
            __isset.@e = true;
            this._e = value;
          }
        }


        public Isset __isset;
        public struct Isset
        {
          public bool @success;
          public bool @e;
        }

        public CallFunction_result()
        {
        }

        public async global::System.Threading.Tasks.Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken)
        {
          iprot.IncrementRecursionDepth();
          try
          {
            TField field;
            await iprot.ReadStructBeginAsync(cancellationToken);
            while (true)
            {
              field = await iprot.ReadFieldBeginAsync(cancellationToken);
              if (field.Type == TType.Stop)
              {
                break;
              }

              switch (field.ID)
              {
                case 0:
                  if (field.Type == TType.Struct)
                  {
                    Success = new global::QueryCat.Plugins.Sdk.VariantValue();
                    await Success.ReadAsync(iprot, cancellationToken);
                  }
                  else
                  {
                    await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
                  }
                  break;
                case 1:
                  if (field.Type == TType.Struct)
                  {
                    E = new global::QueryCat.Plugins.Sdk.QueryCatPluginException();
                    await E.ReadAsync(iprot, cancellationToken);
                  }
                  else
                  {
                    await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
                  }
                  break;
                default: 
                  await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
                  break;
              }

              await iprot.ReadFieldEndAsync(cancellationToken);
            }

            await iprot.ReadStructEndAsync(cancellationToken);
          }
          finally
          {
            iprot.DecrementRecursionDepth();
          }
        }

        public async global::System.Threading.Tasks.Task WriteAsync(TProtocol oprot, CancellationToken cancellationToken)
        {
          oprot.IncrementRecursionDepth();
          try
          {
            var tmp351 = new TStruct("CallFunction_result");
            await oprot.WriteStructBeginAsync(tmp351, cancellationToken);
            var tmp352 = new TField();

            if(this.__isset.@success)
            {
              if (Success != null)
              {
                tmp352.Name = "Success";
                tmp352.Type = TType.Struct;
                tmp352.ID = 0;
                await oprot.WriteFieldBeginAsync(tmp352, cancellationToken);
                await Success.WriteAsync(oprot, cancellationToken);
                await oprot.WriteFieldEndAsync(cancellationToken);
              }
            }
            else if(this.__isset.@e)
            {
              if (E != null)
              {
                tmp352.Name = "E";
                tmp352.Type = TType.Struct;
                tmp352.ID = 1;
                await oprot.WriteFieldBeginAsync(tmp352, cancellationToken);
                await E.WriteAsync(oprot, cancellationToken);
                await oprot.WriteFieldEndAsync(cancellationToken);
              }
            }
            await oprot.WriteFieldStopAsync(cancellationToken);
            await oprot.WriteStructEndAsync(cancellationToken);
          }
          finally
          {
            oprot.DecrementRecursionDepth();
          }
        }

        public override bool Equals(object? that)
        {
          if (that is not CallFunction_result other) return false;
          if (ReferenceEquals(this, other)) return true;
          return ((__isset.@success == other.__isset.@success) && ((!__isset.@success) || (global::System.Object.Equals(Success, other.Success))))
            && ((__isset.@e == other.__isset.@e) && ((!__isset.@e) || (global::System.Object.Equals(E, other.E))));
        }

        public override int GetHashCode() {
          int hashcode = 157;
          unchecked {
            if((Success != null) && __isset.@success)
            {
              hashcode = (hashcode * 397) + Success.GetHashCode();
            }
            if((E != null) && __isset.@e)
            {
              hashcode = (hashcode * 397) + E.GetHashCode();
            }
          }
          return hashcode;
        }

        public override string ToString()
        {
          var tmp353 = new StringBuilder("CallFunction_result(");
          int tmp354 = 0;
          if((Success != null) && __isset.@success)
          {
            if(0 < tmp354++) { tmp353.Append(", "); }
            tmp353.Append("Success: ");
            Success.ToString(tmp353);
          }
          if((E != null) && __isset.@e)
          {
            if(0 < tmp354++) { tmp353.Append(", "); }
            tmp353.Append("E: ");
            E.ToString(tmp353);
          }
          tmp353.Append(')');
          return tmp353.ToString();
        }
      }


      public partial class Initialize_args : TBase
      {

        public Initialize_args()
        {
        }

        public async global::System.Threading.Tasks.Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken)
        {
          iprot.IncrementRecursionDepth();
          try
          {
            TField field;
            await iprot.ReadStructBeginAsync(cancellationToken);
            while (true)
            {
              field = await iprot.ReadFieldBeginAsync(cancellationToken);
              if (field.Type == TType.Stop)
              {
                break;
              }

              switch (field.ID)
              {
                default: 
                  await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
                  break;
              }

              await iprot.ReadFieldEndAsync(cancellationToken);
            }

            await iprot.ReadStructEndAsync(cancellationToken);
          }
          finally
          {
            iprot.DecrementRecursionDepth();
          }
        }

        public async global::System.Threading.Tasks.Task WriteAsync(TProtocol oprot, CancellationToken cancellationToken)
        {
          oprot.IncrementRecursionDepth();
          try
          {
            var tmp355 = new TStruct("Initialize_args");
            await oprot.WriteStructBeginAsync(tmp355, cancellationToken);
            await oprot.WriteFieldStopAsync(cancellationToken);
            await oprot.WriteStructEndAsync(cancellationToken);
          }
          finally
          {
            oprot.DecrementRecursionDepth();
          }
        }

        public override bool Equals(object? that)
        {
          if (that is not Initialize_args other) return false;
          if (ReferenceEquals(this, other)) return true;
          return true;
        }

        public override int GetHashCode() {
          int hashcode = 157;
          unchecked {
          }
          return hashcode;
        }

        public override string ToString()
        {
          var tmp356 = new StringBuilder("Initialize_args(");
          tmp356.Append(')');
          return tmp356.ToString();
        }
      }


      public partial class Initialize_result : TBase
      {
        private global::QueryCat.Plugins.Sdk.QueryCatPluginException? _e;

        public global::QueryCat.Plugins.Sdk.QueryCatPluginException? E
        {
          get
          {
            return _e;
          }
          set
          {
            __isset.@e = true;
            this._e = value;
          }
        }


        public Isset __isset;
        public struct Isset
        {
          public bool @e;
        }

        public Initialize_result()
        {
        }

        public async global::System.Threading.Tasks.Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken)
        {
          iprot.IncrementRecursionDepth();
          try
          {
            TField field;
            await iprot.ReadStructBeginAsync(cancellationToken);
            while (true)
            {
              field = await iprot.ReadFieldBeginAsync(cancellationToken);
              if (field.Type == TType.Stop)
              {
                break;
              }

              switch (field.ID)
              {
                case 1:
                  if (field.Type == TType.Struct)
                  {
                    E = new global::QueryCat.Plugins.Sdk.QueryCatPluginException();
                    await E.ReadAsync(iprot, cancellationToken);
                  }
                  else
                  {
                    await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
                  }
                  break;
                default: 
                  await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
                  break;
              }

              await iprot.ReadFieldEndAsync(cancellationToken);
            }

            await iprot.ReadStructEndAsync(cancellationToken);
          }
          finally
          {
            iprot.DecrementRecursionDepth();
          }
        }

        public async global::System.Threading.Tasks.Task WriteAsync(TProtocol oprot, CancellationToken cancellationToken)
        {
          oprot.IncrementRecursionDepth();
          try
          {
            var tmp358 = new TStruct("Initialize_result");
            await oprot.WriteStructBeginAsync(tmp358, cancellationToken);
            var tmp359 = new TField();

            if(this.__isset.@e)
            {
              if (E != null)
              {
                tmp359.Name = "E";
                tmp359.Type = TType.Struct;
                tmp359.ID = 1;
                await oprot.WriteFieldBeginAsync(tmp359, cancellationToken);
                await E.WriteAsync(oprot, cancellationToken);
                await oprot.WriteFieldEndAsync(cancellationToken);
              }
            }
            await oprot.WriteFieldStopAsync(cancellationToken);
            await oprot.WriteStructEndAsync(cancellationToken);
          }
          finally
          {
            oprot.DecrementRecursionDepth();
          }
        }

        public override bool Equals(object? that)
        {
          if (that is not Initialize_result other) return false;
          if (ReferenceEquals(this, other)) return true;
          return ((__isset.@e == other.__isset.@e) && ((!__isset.@e) || (global::System.Object.Equals(E, other.E))));
        }

        public override int GetHashCode() {
          int hashcode = 157;
          unchecked {
            if((E != null) && __isset.@e)
            {
              hashcode = (hashcode * 397) + E.GetHashCode();
            }
          }
          return hashcode;
        }

        public override string ToString()
        {
          var tmp360 = new StringBuilder("Initialize_result(");
          int tmp361 = 0;
          if((E != null) && __isset.@e)
          {
            if(0 < tmp361++) { tmp360.Append(", "); }
            tmp360.Append("E: ");
            E.ToString(tmp360);
          }
          tmp360.Append(')');
          return tmp360.ToString();
        }
      }


      public partial class Shutdown_args : TBase
      {

        public Shutdown_args()
        {
        }

        public async global::System.Threading.Tasks.Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken)
        {
          iprot.IncrementRecursionDepth();
          try
          {
            TField field;
            await iprot.ReadStructBeginAsync(cancellationToken);
            while (true)
            {
              field = await iprot.ReadFieldBeginAsync(cancellationToken);
              if (field.Type == TType.Stop)
              {
                break;
              }

              switch (field.ID)
              {
                default: 
                  await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
                  break;
              }

              await iprot.ReadFieldEndAsync(cancellationToken);
            }

            await iprot.ReadStructEndAsync(cancellationToken);
          }
          finally
          {
            iprot.DecrementRecursionDepth();
          }
        }

        public async global::System.Threading.Tasks.Task WriteAsync(TProtocol oprot, CancellationToken cancellationToken)
        {
          oprot.IncrementRecursionDepth();
          try
          {
            var tmp362 = new TStruct("Shutdown_args");
            await oprot.WriteStructBeginAsync(tmp362, cancellationToken);
            await oprot.WriteFieldStopAsync(cancellationToken);
            await oprot.WriteStructEndAsync(cancellationToken);
          }
          finally
          {
            oprot.DecrementRecursionDepth();
          }
        }

        public override bool Equals(object? that)
        {
          if (that is not Shutdown_args other) return false;
          if (ReferenceEquals(this, other)) return true;
          return true;
        }

        public override int GetHashCode() {
          int hashcode = 157;
          unchecked {
          }
          return hashcode;
        }

        public override string ToString()
        {
          var tmp363 = new StringBuilder("Shutdown_args(");
          tmp363.Append(')');
          return tmp363.ToString();
        }
      }


      public partial class Shutdown_result : TBase
      {
        private global::QueryCat.Plugins.Sdk.QueryCatPluginException? _e;

        public global::QueryCat.Plugins.Sdk.QueryCatPluginException? E
        {
          get
          {
            return _e;
          }
          set
          {
            __isset.@e = true;
            this._e = value;
          }
        }


        public Isset __isset;
        public struct Isset
        {
          public bool @e;
        }

        public Shutdown_result()
        {
        }

        public async global::System.Threading.Tasks.Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken)
        {
          iprot.IncrementRecursionDepth();
          try
          {
            TField field;
            await iprot.ReadStructBeginAsync(cancellationToken);
            while (true)
            {
              field = await iprot.ReadFieldBeginAsync(cancellationToken);
              if (field.Type == TType.Stop)
              {
                break;
              }

              switch (field.ID)
              {
                case 1:
                  if (field.Type == TType.Struct)
                  {
                    E = new global::QueryCat.Plugins.Sdk.QueryCatPluginException();
                    await E.ReadAsync(iprot, cancellationToken);
                  }
                  else
                  {
                    await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
                  }
                  break;
                default: 
                  await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
                  break;
              }

              await iprot.ReadFieldEndAsync(cancellationToken);
            }

            await iprot.ReadStructEndAsync(cancellationToken);
          }
          finally
          {
            iprot.DecrementRecursionDepth();
          }
        }

        public async global::System.Threading.Tasks.Task WriteAsync(TProtocol oprot, CancellationToken cancellationToken)
        {
          oprot.IncrementRecursionDepth();
          try
          {
            var tmp365 = new TStruct("Shutdown_result");
            await oprot.WriteStructBeginAsync(tmp365, cancellationToken);
            var tmp366 = new TField();

            if(this.__isset.@e)
            {
              if (E != null)
              {
                tmp366.Name = "E";
                tmp366.Type = TType.Struct;
                tmp366.ID = 1;
                await oprot.WriteFieldBeginAsync(tmp366, cancellationToken);
                await E.WriteAsync(oprot, cancellationToken);
                await oprot.WriteFieldEndAsync(cancellationToken);
              }
            }
            await oprot.WriteFieldStopAsync(cancellationToken);
            await oprot.WriteStructEndAsync(cancellationToken);
          }
          finally
          {
            oprot.DecrementRecursionDepth();
          }
        }

        public override bool Equals(object? that)
        {
          if (that is not Shutdown_result other) return false;
          if (ReferenceEquals(this, other)) return true;
          return ((__isset.@e == other.__isset.@e) && ((!__isset.@e) || (global::System.Object.Equals(E, other.E))));
        }

        public override int GetHashCode() {
          int hashcode = 157;
          unchecked {
            if((E != null) && __isset.@e)
            {
              hashcode = (hashcode * 397) + E.GetHashCode();
            }
          }
          return hashcode;
        }

        public override string ToString()
        {
          var tmp367 = new StringBuilder("Shutdown_result(");
          int tmp368 = 0;
          if((E != null) && __isset.@e)
          {
            if(0 < tmp368++) { tmp367.Append(", "); }
            tmp367.Append("E: ");
            E.ToString(tmp367);
          }
          tmp367.Append(')');
          return tmp367.ToString();
        }
      }


      public partial class RowsSet_GetColumns_args : TBase
      {

        public int ObjectHandle { get; set; } = 0;

        public RowsSet_GetColumns_args()
        {
        }

        public RowsSet_GetColumns_args(int object_handle) : this()
        {
          this.ObjectHandle = object_handle;
        }

        public async global::System.Threading.Tasks.Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken)
        {
          iprot.IncrementRecursionDepth();
          try
          {
            bool isset_object_handle = false;
            TField field;
            await iprot.ReadStructBeginAsync(cancellationToken);
            while (true)
            {
              field = await iprot.ReadFieldBeginAsync(cancellationToken);
              if (field.Type == TType.Stop)
              {
                break;
              }

              switch (field.ID)
              {
                case 1:
                  if (field.Type == TType.I32)
                  {
                    ObjectHandle = await iprot.ReadI32Async(cancellationToken);
                    isset_object_handle = true;
                  }
                  else
                  {
                    await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
                  }
                  break;
                default: 
                  await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
                  break;
              }

              await iprot.ReadFieldEndAsync(cancellationToken);
            }

            await iprot.ReadStructEndAsync(cancellationToken);
            if (!isset_object_handle)
            {
              throw new TProtocolException(TProtocolException.INVALID_DATA);
            }
          }
          finally
          {
            iprot.DecrementRecursionDepth();
          }
        }

        public async global::System.Threading.Tasks.Task WriteAsync(TProtocol oprot, CancellationToken cancellationToken)
        {
          oprot.IncrementRecursionDepth();
          try
          {
            var tmp369 = new TStruct("RowsSet_GetColumns_args");
            await oprot.WriteStructBeginAsync(tmp369, cancellationToken);
            var tmp370 = new TField();
            tmp370.Name = "object_handle";
            tmp370.Type = TType.I32;
            tmp370.ID = 1;
            await oprot.WriteFieldBeginAsync(tmp370, cancellationToken);
            await oprot.WriteI32Async(ObjectHandle, cancellationToken);
            await oprot.WriteFieldEndAsync(cancellationToken);
            await oprot.WriteFieldStopAsync(cancellationToken);
            await oprot.WriteStructEndAsync(cancellationToken);
          }
          finally
          {
            oprot.DecrementRecursionDepth();
          }
        }

        public override bool Equals(object? that)
        {
          if (that is not RowsSet_GetColumns_args other) return false;
          if (ReferenceEquals(this, other)) return true;
          return global::System.Object.Equals(ObjectHandle, other.ObjectHandle);
        }

        public override int GetHashCode() {
          int hashcode = 157;
          unchecked {
            hashcode = (hashcode * 397) + ObjectHandle.GetHashCode();
          }
          return hashcode;
        }

        public override string ToString()
        {
          var tmp371 = new StringBuilder("RowsSet_GetColumns_args(");
          tmp371.Append(", ObjectHandle: ");
          ObjectHandle.ToString(tmp371);
          tmp371.Append(')');
          return tmp371.ToString();
        }
      }


      public partial class RowsSet_GetColumns_result : TBase
      {
        private List<global::QueryCat.Plugins.Sdk.Column>? _success;
        private global::QueryCat.Plugins.Sdk.QueryCatPluginException? _e;

        public List<global::QueryCat.Plugins.Sdk.Column>? Success
        {
          get
          {
            return _success;
          }
          set
          {
            __isset.@success = true;
            this._success = value;
          }
        }

        public global::QueryCat.Plugins.Sdk.QueryCatPluginException? E
        {
          get
          {
            return _e;
          }
          set
          {
            __isset.@e = true;
            this._e = value;
          }
        }


        public Isset __isset;
        public struct Isset
        {
          public bool @success;
          public bool @e;
        }

        public RowsSet_GetColumns_result()
        {
        }

        public async global::System.Threading.Tasks.Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken)
        {
          iprot.IncrementRecursionDepth();
          try
          {
            TField field;
            await iprot.ReadStructBeginAsync(cancellationToken);
            while (true)
            {
              field = await iprot.ReadFieldBeginAsync(cancellationToken);
              if (field.Type == TType.Stop)
              {
                break;
              }

              switch (field.ID)
              {
                case 0:
                  if (field.Type == TType.List)
                  {
                    {
                      var _list373 = await iprot.ReadListBeginAsync(cancellationToken);
                      Success = new List<global::QueryCat.Plugins.Sdk.Column>(_list373.Count);
                      for(int _i374 = 0; _i374 < _list373.Count; ++_i374)
                      {
                        global::QueryCat.Plugins.Sdk.Column _elem375;
                        _elem375 = new global::QueryCat.Plugins.Sdk.Column();
                        await _elem375.ReadAsync(iprot, cancellationToken);
                        Success.Add(_elem375);
                      }
                      await iprot.ReadListEndAsync(cancellationToken);
                    }
                  }
                  else
                  {
                    await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
                  }
                  break;
                case 1:
                  if (field.Type == TType.Struct)
                  {
                    E = new global::QueryCat.Plugins.Sdk.QueryCatPluginException();
                    await E.ReadAsync(iprot, cancellationToken);
                  }
                  else
                  {
                    await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
                  }
                  break;
                default: 
                  await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
                  break;
              }

              await iprot.ReadFieldEndAsync(cancellationToken);
            }

            await iprot.ReadStructEndAsync(cancellationToken);
          }
          finally
          {
            iprot.DecrementRecursionDepth();
          }
        }

        public async global::System.Threading.Tasks.Task WriteAsync(TProtocol oprot, CancellationToken cancellationToken)
        {
          oprot.IncrementRecursionDepth();
          try
          {
            var tmp376 = new TStruct("RowsSet_GetColumns_result");
            await oprot.WriteStructBeginAsync(tmp376, cancellationToken);
            var tmp377 = new TField();

            if(this.__isset.@success)
            {
              if (Success != null)
              {
                tmp377.Name = "Success";
                tmp377.Type = TType.List;
                tmp377.ID = 0;
                await oprot.WriteFieldBeginAsync(tmp377, cancellationToken);
                await oprot.WriteListBeginAsync(new TList(TType.Struct, Success.Count), cancellationToken);
                foreach (global::QueryCat.Plugins.Sdk.Column _iter378 in Success)
                {
                  await _iter378.WriteAsync(oprot, cancellationToken);
                }
                await oprot.WriteListEndAsync(cancellationToken);
                await oprot.WriteFieldEndAsync(cancellationToken);
              }
            }
            else if(this.__isset.@e)
            {
              if (E != null)
              {
                tmp377.Name = "E";
                tmp377.Type = TType.Struct;
                tmp377.ID = 1;
                await oprot.WriteFieldBeginAsync(tmp377, cancellationToken);
                await E.WriteAsync(oprot, cancellationToken);
                await oprot.WriteFieldEndAsync(cancellationToken);
              }
            }
            await oprot.WriteFieldStopAsync(cancellationToken);
            await oprot.WriteStructEndAsync(cancellationToken);
          }
          finally
          {
            oprot.DecrementRecursionDepth();
          }
        }

        public override bool Equals(object? that)
        {
          if (that is not RowsSet_GetColumns_result other) return false;
          if (ReferenceEquals(this, other)) return true;
          return ((__isset.@success == other.__isset.@success) && ((!__isset.@success) || (TCollections.Equals(Success, other.Success))))
            && ((__isset.@e == other.__isset.@e) && ((!__isset.@e) || (global::System.Object.Equals(E, other.E))));
        }

        public override int GetHashCode() {
          int hashcode = 157;
          unchecked {
            if((Success != null) && __isset.@success)
            {
              hashcode = (hashcode * 397) + TCollections.GetHashCode(Success);
            }
            if((E != null) && __isset.@e)
            {
              hashcode = (hashcode * 397) + E.GetHashCode();
            }
          }
          return hashcode;
        }

        public override string ToString()
        {
          var tmp379 = new StringBuilder("RowsSet_GetColumns_result(");
          int tmp380 = 0;
          if((Success != null) && __isset.@success)
          {
            if(0 < tmp380++) { tmp379.Append(", "); }
            tmp379.Append("Success: ");
            Success.ToString(tmp379);
          }
          if((E != null) && __isset.@e)
          {
            if(0 < tmp380++) { tmp379.Append(", "); }
            tmp379.Append("E: ");
            E.ToString(tmp379);
          }
          tmp379.Append(')');
          return tmp379.ToString();
        }
      }


      public partial class RowsSet_Open_args : TBase
      {

        public int ObjectHandle { get; set; } = 0;

        public RowsSet_Open_args()
        {
        }

        public RowsSet_Open_args(int object_handle) : this()
        {
          this.ObjectHandle = object_handle;
        }

        public async global::System.Threading.Tasks.Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken)
        {
          iprot.IncrementRecursionDepth();
          try
          {
            bool isset_object_handle = false;
            TField field;
            await iprot.ReadStructBeginAsync(cancellationToken);
            while (true)
            {
              field = await iprot.ReadFieldBeginAsync(cancellationToken);
              if (field.Type == TType.Stop)
              {
                break;
              }

              switch (field.ID)
              {
                case 1:
                  if (field.Type == TType.I32)
                  {
                    ObjectHandle = await iprot.ReadI32Async(cancellationToken);
                    isset_object_handle = true;
                  }
                  else
                  {
                    await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
                  }
                  break;
                default: 
                  await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
                  break;
              }

              await iprot.ReadFieldEndAsync(cancellationToken);
            }

            await iprot.ReadStructEndAsync(cancellationToken);
            if (!isset_object_handle)
            {
              throw new TProtocolException(TProtocolException.INVALID_DATA);
            }
          }
          finally
          {
            iprot.DecrementRecursionDepth();
          }
        }

        public async global::System.Threading.Tasks.Task WriteAsync(TProtocol oprot, CancellationToken cancellationToken)
        {
          oprot.IncrementRecursionDepth();
          try
          {
            var tmp381 = new TStruct("RowsSet_Open_args");
            await oprot.WriteStructBeginAsync(tmp381, cancellationToken);
            var tmp382 = new TField();
            tmp382.Name = "object_handle";
            tmp382.Type = TType.I32;
            tmp382.ID = 1;
            await oprot.WriteFieldBeginAsync(tmp382, cancellationToken);
            await oprot.WriteI32Async(ObjectHandle, cancellationToken);
            await oprot.WriteFieldEndAsync(cancellationToken);
            await oprot.WriteFieldStopAsync(cancellationToken);
            await oprot.WriteStructEndAsync(cancellationToken);
          }
          finally
          {
            oprot.DecrementRecursionDepth();
          }
        }

        public override bool Equals(object? that)
        {
          if (that is not RowsSet_Open_args other) return false;
          if (ReferenceEquals(this, other)) return true;
          return global::System.Object.Equals(ObjectHandle, other.ObjectHandle);
        }

        public override int GetHashCode() {
          int hashcode = 157;
          unchecked {
            hashcode = (hashcode * 397) + ObjectHandle.GetHashCode();
          }
          return hashcode;
        }

        public override string ToString()
        {
          var tmp383 = new StringBuilder("RowsSet_Open_args(");
          tmp383.Append(", ObjectHandle: ");
          ObjectHandle.ToString(tmp383);
          tmp383.Append(')');
          return tmp383.ToString();
        }
      }


      public partial class RowsSet_Open_result : TBase
      {
        private global::QueryCat.Plugins.Sdk.QueryCatPluginException? _e;

        public global::QueryCat.Plugins.Sdk.QueryCatPluginException? E
        {
          get
          {
            return _e;
          }
          set
          {
            __isset.@e = true;
            this._e = value;
          }
        }


        public Isset __isset;
        public struct Isset
        {
          public bool @e;
        }

        public RowsSet_Open_result()
        {
        }

        public async global::System.Threading.Tasks.Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken)
        {
          iprot.IncrementRecursionDepth();
          try
          {
            TField field;
            await iprot.ReadStructBeginAsync(cancellationToken);
            while (true)
            {
              field = await iprot.ReadFieldBeginAsync(cancellationToken);
              if (field.Type == TType.Stop)
              {
                break;
              }

              switch (field.ID)
              {
                case 1:
                  if (field.Type == TType.Struct)
                  {
                    E = new global::QueryCat.Plugins.Sdk.QueryCatPluginException();
                    await E.ReadAsync(iprot, cancellationToken);
                  }
                  else
                  {
                    await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
                  }
                  break;
                default: 
                  await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
                  break;
              }

              await iprot.ReadFieldEndAsync(cancellationToken);
            }

            await iprot.ReadStructEndAsync(cancellationToken);
          }
          finally
          {
            iprot.DecrementRecursionDepth();
          }
        }

        public async global::System.Threading.Tasks.Task WriteAsync(TProtocol oprot, CancellationToken cancellationToken)
        {
          oprot.IncrementRecursionDepth();
          try
          {
            var tmp385 = new TStruct("RowsSet_Open_result");
            await oprot.WriteStructBeginAsync(tmp385, cancellationToken);
            var tmp386 = new TField();

            if(this.__isset.@e)
            {
              if (E != null)
              {
                tmp386.Name = "E";
                tmp386.Type = TType.Struct;
                tmp386.ID = 1;
                await oprot.WriteFieldBeginAsync(tmp386, cancellationToken);
                await E.WriteAsync(oprot, cancellationToken);
                await oprot.WriteFieldEndAsync(cancellationToken);
              }
            }
            await oprot.WriteFieldStopAsync(cancellationToken);
            await oprot.WriteStructEndAsync(cancellationToken);
          }
          finally
          {
            oprot.DecrementRecursionDepth();
          }
        }

        public override bool Equals(object? that)
        {
          if (that is not RowsSet_Open_result other) return false;
          if (ReferenceEquals(this, other)) return true;
          return ((__isset.@e == other.__isset.@e) && ((!__isset.@e) || (global::System.Object.Equals(E, other.E))));
        }

        public override int GetHashCode() {
          int hashcode = 157;
          unchecked {
            if((E != null) && __isset.@e)
            {
              hashcode = (hashcode * 397) + E.GetHashCode();
            }
          }
          return hashcode;
        }

        public override string ToString()
        {
          var tmp387 = new StringBuilder("RowsSet_Open_result(");
          int tmp388 = 0;
          if((E != null) && __isset.@e)
          {
            if(0 < tmp388++) { tmp387.Append(", "); }
            tmp387.Append("E: ");
            E.ToString(tmp387);
          }
          tmp387.Append(')');
          return tmp387.ToString();
        }
      }


      public partial class RowsSet_Close_args : TBase
      {

        public int ObjectHandle { get; set; } = 0;

        public RowsSet_Close_args()
        {
        }

        public RowsSet_Close_args(int object_handle) : this()
        {
          this.ObjectHandle = object_handle;
        }

        public async global::System.Threading.Tasks.Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken)
        {
          iprot.IncrementRecursionDepth();
          try
          {
            bool isset_object_handle = false;
            TField field;
            await iprot.ReadStructBeginAsync(cancellationToken);
            while (true)
            {
              field = await iprot.ReadFieldBeginAsync(cancellationToken);
              if (field.Type == TType.Stop)
              {
                break;
              }

              switch (field.ID)
              {
                case 1:
                  if (field.Type == TType.I32)
                  {
                    ObjectHandle = await iprot.ReadI32Async(cancellationToken);
                    isset_object_handle = true;
                  }
                  else
                  {
                    await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
                  }
                  break;
                default: 
                  await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
                  break;
              }

              await iprot.ReadFieldEndAsync(cancellationToken);
            }

            await iprot.ReadStructEndAsync(cancellationToken);
            if (!isset_object_handle)
            {
              throw new TProtocolException(TProtocolException.INVALID_DATA);
            }
          }
          finally
          {
            iprot.DecrementRecursionDepth();
          }
        }

        public async global::System.Threading.Tasks.Task WriteAsync(TProtocol oprot, CancellationToken cancellationToken)
        {
          oprot.IncrementRecursionDepth();
          try
          {
            var tmp389 = new TStruct("RowsSet_Close_args");
            await oprot.WriteStructBeginAsync(tmp389, cancellationToken);
            var tmp390 = new TField();
            tmp390.Name = "object_handle";
            tmp390.Type = TType.I32;
            tmp390.ID = 1;
            await oprot.WriteFieldBeginAsync(tmp390, cancellationToken);
            await oprot.WriteI32Async(ObjectHandle, cancellationToken);
            await oprot.WriteFieldEndAsync(cancellationToken);
            await oprot.WriteFieldStopAsync(cancellationToken);
            await oprot.WriteStructEndAsync(cancellationToken);
          }
          finally
          {
            oprot.DecrementRecursionDepth();
          }
        }

        public override bool Equals(object? that)
        {
          if (that is not RowsSet_Close_args other) return false;
          if (ReferenceEquals(this, other)) return true;
          return global::System.Object.Equals(ObjectHandle, other.ObjectHandle);
        }

        public override int GetHashCode() {
          int hashcode = 157;
          unchecked {
            hashcode = (hashcode * 397) + ObjectHandle.GetHashCode();
          }
          return hashcode;
        }

        public override string ToString()
        {
          var tmp391 = new StringBuilder("RowsSet_Close_args(");
          tmp391.Append(", ObjectHandle: ");
          ObjectHandle.ToString(tmp391);
          tmp391.Append(')');
          return tmp391.ToString();
        }
      }


      public partial class RowsSet_Close_result : TBase
      {
        private global::QueryCat.Plugins.Sdk.QueryCatPluginException? _e;

        public global::QueryCat.Plugins.Sdk.QueryCatPluginException? E
        {
          get
          {
            return _e;
          }
          set
          {
            __isset.@e = true;
            this._e = value;
          }
        }


        public Isset __isset;
        public struct Isset
        {
          public bool @e;
        }

        public RowsSet_Close_result()
        {
        }

        public async global::System.Threading.Tasks.Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken)
        {
          iprot.IncrementRecursionDepth();
          try
          {
            TField field;
            await iprot.ReadStructBeginAsync(cancellationToken);
            while (true)
            {
              field = await iprot.ReadFieldBeginAsync(cancellationToken);
              if (field.Type == TType.Stop)
              {
                break;
              }

              switch (field.ID)
              {
                case 1:
                  if (field.Type == TType.Struct)
                  {
                    E = new global::QueryCat.Plugins.Sdk.QueryCatPluginException();
                    await E.ReadAsync(iprot, cancellationToken);
                  }
                  else
                  {
                    await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
                  }
                  break;
                default: 
                  await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
                  break;
              }

              await iprot.ReadFieldEndAsync(cancellationToken);
            }

            await iprot.ReadStructEndAsync(cancellationToken);
          }
          finally
          {
            iprot.DecrementRecursionDepth();
          }
        }

        public async global::System.Threading.Tasks.Task WriteAsync(TProtocol oprot, CancellationToken cancellationToken)
        {
          oprot.IncrementRecursionDepth();
          try
          {
            var tmp393 = new TStruct("RowsSet_Close_result");
            await oprot.WriteStructBeginAsync(tmp393, cancellationToken);
            var tmp394 = new TField();

            if(this.__isset.@e)
            {
              if (E != null)
              {
                tmp394.Name = "E";
                tmp394.Type = TType.Struct;
                tmp394.ID = 1;
                await oprot.WriteFieldBeginAsync(tmp394, cancellationToken);
                await E.WriteAsync(oprot, cancellationToken);
                await oprot.WriteFieldEndAsync(cancellationToken);
              }
            }
            await oprot.WriteFieldStopAsync(cancellationToken);
            await oprot.WriteStructEndAsync(cancellationToken);
          }
          finally
          {
            oprot.DecrementRecursionDepth();
          }
        }

        public override bool Equals(object? that)
        {
          if (that is not RowsSet_Close_result other) return false;
          if (ReferenceEquals(this, other)) return true;
          return ((__isset.@e == other.__isset.@e) && ((!__isset.@e) || (global::System.Object.Equals(E, other.E))));
        }

        public override int GetHashCode() {
          int hashcode = 157;
          unchecked {
            if((E != null) && __isset.@e)
            {
              hashcode = (hashcode * 397) + E.GetHashCode();
            }
          }
          return hashcode;
        }

        public override string ToString()
        {
          var tmp395 = new StringBuilder("RowsSet_Close_result(");
          int tmp396 = 0;
          if((E != null) && __isset.@e)
          {
            if(0 < tmp396++) { tmp395.Append(", "); }
            tmp395.Append("E: ");
            E.ToString(tmp395);
          }
          tmp395.Append(')');
          return tmp395.ToString();
        }
      }


      public partial class RowsSet_Reset_args : TBase
      {

        public int ObjectHandle { get; set; } = 0;

        public RowsSet_Reset_args()
        {
        }

        public RowsSet_Reset_args(int object_handle) : this()
        {
          this.ObjectHandle = object_handle;
        }

        public async global::System.Threading.Tasks.Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken)
        {
          iprot.IncrementRecursionDepth();
          try
          {
            bool isset_object_handle = false;
            TField field;
            await iprot.ReadStructBeginAsync(cancellationToken);
            while (true)
            {
              field = await iprot.ReadFieldBeginAsync(cancellationToken);
              if (field.Type == TType.Stop)
              {
                break;
              }

              switch (field.ID)
              {
                case 1:
                  if (field.Type == TType.I32)
                  {
                    ObjectHandle = await iprot.ReadI32Async(cancellationToken);
                    isset_object_handle = true;
                  }
                  else
                  {
                    await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
                  }
                  break;
                default: 
                  await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
                  break;
              }

              await iprot.ReadFieldEndAsync(cancellationToken);
            }

            await iprot.ReadStructEndAsync(cancellationToken);
            if (!isset_object_handle)
            {
              throw new TProtocolException(TProtocolException.INVALID_DATA);
            }
          }
          finally
          {
            iprot.DecrementRecursionDepth();
          }
        }

        public async global::System.Threading.Tasks.Task WriteAsync(TProtocol oprot, CancellationToken cancellationToken)
        {
          oprot.IncrementRecursionDepth();
          try
          {
            var tmp397 = new TStruct("RowsSet_Reset_args");
            await oprot.WriteStructBeginAsync(tmp397, cancellationToken);
            var tmp398 = new TField();
            tmp398.Name = "object_handle";
            tmp398.Type = TType.I32;
            tmp398.ID = 1;
            await oprot.WriteFieldBeginAsync(tmp398, cancellationToken);
            await oprot.WriteI32Async(ObjectHandle, cancellationToken);
            await oprot.WriteFieldEndAsync(cancellationToken);
            await oprot.WriteFieldStopAsync(cancellationToken);
            await oprot.WriteStructEndAsync(cancellationToken);
          }
          finally
          {
            oprot.DecrementRecursionDepth();
          }
        }

        public override bool Equals(object? that)
        {
          if (that is not RowsSet_Reset_args other) return false;
          if (ReferenceEquals(this, other)) return true;
          return global::System.Object.Equals(ObjectHandle, other.ObjectHandle);
        }

        public override int GetHashCode() {
          int hashcode = 157;
          unchecked {
            hashcode = (hashcode * 397) + ObjectHandle.GetHashCode();
          }
          return hashcode;
        }

        public override string ToString()
        {
          var tmp399 = new StringBuilder("RowsSet_Reset_args(");
          tmp399.Append(", ObjectHandle: ");
          ObjectHandle.ToString(tmp399);
          tmp399.Append(')');
          return tmp399.ToString();
        }
      }


      public partial class RowsSet_Reset_result : TBase
      {
        private global::QueryCat.Plugins.Sdk.QueryCatPluginException? _e;

        public global::QueryCat.Plugins.Sdk.QueryCatPluginException? E
        {
          get
          {
            return _e;
          }
          set
          {
            __isset.@e = true;
            this._e = value;
          }
        }


        public Isset __isset;
        public struct Isset
        {
          public bool @e;
        }

        public RowsSet_Reset_result()
        {
        }

        public async global::System.Threading.Tasks.Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken)
        {
          iprot.IncrementRecursionDepth();
          try
          {
            TField field;
            await iprot.ReadStructBeginAsync(cancellationToken);
            while (true)
            {
              field = await iprot.ReadFieldBeginAsync(cancellationToken);
              if (field.Type == TType.Stop)
              {
                break;
              }

              switch (field.ID)
              {
                case 1:
                  if (field.Type == TType.Struct)
                  {
                    E = new global::QueryCat.Plugins.Sdk.QueryCatPluginException();
                    await E.ReadAsync(iprot, cancellationToken);
                  }
                  else
                  {
                    await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
                  }
                  break;
                default: 
                  await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
                  break;
              }

              await iprot.ReadFieldEndAsync(cancellationToken);
            }

            await iprot.ReadStructEndAsync(cancellationToken);
          }
          finally
          {
            iprot.DecrementRecursionDepth();
          }
        }

        public async global::System.Threading.Tasks.Task WriteAsync(TProtocol oprot, CancellationToken cancellationToken)
        {
          oprot.IncrementRecursionDepth();
          try
          {
            var tmp401 = new TStruct("RowsSet_Reset_result");
            await oprot.WriteStructBeginAsync(tmp401, cancellationToken);
            var tmp402 = new TField();

            if(this.__isset.@e)
            {
              if (E != null)
              {
                tmp402.Name = "E";
                tmp402.Type = TType.Struct;
                tmp402.ID = 1;
                await oprot.WriteFieldBeginAsync(tmp402, cancellationToken);
                await E.WriteAsync(oprot, cancellationToken);
                await oprot.WriteFieldEndAsync(cancellationToken);
              }
            }
            await oprot.WriteFieldStopAsync(cancellationToken);
            await oprot.WriteStructEndAsync(cancellationToken);
          }
          finally
          {
            oprot.DecrementRecursionDepth();
          }
        }

        public override bool Equals(object? that)
        {
          if (that is not RowsSet_Reset_result other) return false;
          if (ReferenceEquals(this, other)) return true;
          return ((__isset.@e == other.__isset.@e) && ((!__isset.@e) || (global::System.Object.Equals(E, other.E))));
        }

        public override int GetHashCode() {
          int hashcode = 157;
          unchecked {
            if((E != null) && __isset.@e)
            {
              hashcode = (hashcode * 397) + E.GetHashCode();
            }
          }
          return hashcode;
        }

        public override string ToString()
        {
          var tmp403 = new StringBuilder("RowsSet_Reset_result(");
          int tmp404 = 0;
          if((E != null) && __isset.@e)
          {
            if(0 < tmp404++) { tmp403.Append(", "); }
            tmp403.Append("E: ");
            E.ToString(tmp403);
          }
          tmp403.Append(')');
          return tmp403.ToString();
        }
      }


      public partial class RowsSet_SetContext_args : TBase
      {

        public int ObjectHandle { get; set; } = 0;

        public global::QueryCat.Plugins.Sdk.ContextQueryInfo? ContextQueryInfo { get; set; }

        public RowsSet_SetContext_args()
        {
        }

        public RowsSet_SetContext_args(int object_handle, global::QueryCat.Plugins.Sdk.ContextQueryInfo? context_query_info) : this()
        {
          this.ObjectHandle = object_handle;
          this.ContextQueryInfo = context_query_info;
        }

        public async global::System.Threading.Tasks.Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken)
        {
          iprot.IncrementRecursionDepth();
          try
          {
            bool isset_object_handle = false;
            bool isset_context_query_info = false;
            TField field;
            await iprot.ReadStructBeginAsync(cancellationToken);
            while (true)
            {
              field = await iprot.ReadFieldBeginAsync(cancellationToken);
              if (field.Type == TType.Stop)
              {
                break;
              }

              switch (field.ID)
              {
                case 1:
                  if (field.Type == TType.I32)
                  {
                    ObjectHandle = await iprot.ReadI32Async(cancellationToken);
                    isset_object_handle = true;
                  }
                  else
                  {
                    await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
                  }
                  break;
                case 2:
                  if (field.Type == TType.Struct)
                  {
                    ContextQueryInfo = new global::QueryCat.Plugins.Sdk.ContextQueryInfo();
                    await ContextQueryInfo.ReadAsync(iprot, cancellationToken);
                    isset_context_query_info = true;
                  }
                  else
                  {
                    await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
                  }
                  break;
                default: 
                  await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
                  break;
              }

              await iprot.ReadFieldEndAsync(cancellationToken);
            }

            await iprot.ReadStructEndAsync(cancellationToken);
            if (!isset_object_handle)
            {
              throw new TProtocolException(TProtocolException.INVALID_DATA);
            }
            if (!isset_context_query_info)
            {
              throw new TProtocolException(TProtocolException.INVALID_DATA);
            }
          }
          finally
          {
            iprot.DecrementRecursionDepth();
          }
        }

        public async global::System.Threading.Tasks.Task WriteAsync(TProtocol oprot, CancellationToken cancellationToken)
        {
          oprot.IncrementRecursionDepth();
          try
          {
            var tmp405 = new TStruct("RowsSet_SetContext_args");
            await oprot.WriteStructBeginAsync(tmp405, cancellationToken);
            var tmp406 = new TField();
            tmp406.Name = "object_handle";
            tmp406.Type = TType.I32;
            tmp406.ID = 1;
            await oprot.WriteFieldBeginAsync(tmp406, cancellationToken);
            await oprot.WriteI32Async(ObjectHandle, cancellationToken);
            await oprot.WriteFieldEndAsync(cancellationToken);
            if((ContextQueryInfo != null))
            {
              tmp406.Name = "context_query_info";
              tmp406.Type = TType.Struct;
              tmp406.ID = 2;
              await oprot.WriteFieldBeginAsync(tmp406, cancellationToken);
              await ContextQueryInfo.WriteAsync(oprot, cancellationToken);
              await oprot.WriteFieldEndAsync(cancellationToken);
            }
            await oprot.WriteFieldStopAsync(cancellationToken);
            await oprot.WriteStructEndAsync(cancellationToken);
          }
          finally
          {
            oprot.DecrementRecursionDepth();
          }
        }

        public override bool Equals(object? that)
        {
          if (that is not RowsSet_SetContext_args other) return false;
          if (ReferenceEquals(this, other)) return true;
          return global::System.Object.Equals(ObjectHandle, other.ObjectHandle)
            && global::System.Object.Equals(ContextQueryInfo, other.ContextQueryInfo);
        }

        public override int GetHashCode() {
          int hashcode = 157;
          unchecked {
            hashcode = (hashcode * 397) + ObjectHandle.GetHashCode();
            if((ContextQueryInfo != null))
            {
              hashcode = (hashcode * 397) + ContextQueryInfo.GetHashCode();
            }
          }
          return hashcode;
        }

        public override string ToString()
        {
          var tmp407 = new StringBuilder("RowsSet_SetContext_args(");
          tmp407.Append(", ObjectHandle: ");
          ObjectHandle.ToString(tmp407);
          if((ContextQueryInfo != null))
          {
            tmp407.Append(", ContextQueryInfo: ");
            ContextQueryInfo.ToString(tmp407);
          }
          tmp407.Append(')');
          return tmp407.ToString();
        }
      }


      public partial class RowsSet_SetContext_result : TBase
      {
        private global::QueryCat.Plugins.Sdk.QueryCatPluginException? _e;

        public global::QueryCat.Plugins.Sdk.QueryCatPluginException? E
        {
          get
          {
            return _e;
          }
          set
          {
            __isset.@e = true;
            this._e = value;
          }
        }


        public Isset __isset;
        public struct Isset
        {
          public bool @e;
        }

        public RowsSet_SetContext_result()
        {
        }

        public async global::System.Threading.Tasks.Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken)
        {
          iprot.IncrementRecursionDepth();
          try
          {
            TField field;
            await iprot.ReadStructBeginAsync(cancellationToken);
            while (true)
            {
              field = await iprot.ReadFieldBeginAsync(cancellationToken);
              if (field.Type == TType.Stop)
              {
                break;
              }

              switch (field.ID)
              {
                case 1:
                  if (field.Type == TType.Struct)
                  {
                    E = new global::QueryCat.Plugins.Sdk.QueryCatPluginException();
                    await E.ReadAsync(iprot, cancellationToken);
                  }
                  else
                  {
                    await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
                  }
                  break;
                default: 
                  await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
                  break;
              }

              await iprot.ReadFieldEndAsync(cancellationToken);
            }

            await iprot.ReadStructEndAsync(cancellationToken);
          }
          finally
          {
            iprot.DecrementRecursionDepth();
          }
        }

        public async global::System.Threading.Tasks.Task WriteAsync(TProtocol oprot, CancellationToken cancellationToken)
        {
          oprot.IncrementRecursionDepth();
          try
          {
            var tmp409 = new TStruct("RowsSet_SetContext_result");
            await oprot.WriteStructBeginAsync(tmp409, cancellationToken);
            var tmp410 = new TField();

            if(this.__isset.@e)
            {
              if (E != null)
              {
                tmp410.Name = "E";
                tmp410.Type = TType.Struct;
                tmp410.ID = 1;
                await oprot.WriteFieldBeginAsync(tmp410, cancellationToken);
                await E.WriteAsync(oprot, cancellationToken);
                await oprot.WriteFieldEndAsync(cancellationToken);
              }
            }
            await oprot.WriteFieldStopAsync(cancellationToken);
            await oprot.WriteStructEndAsync(cancellationToken);
          }
          finally
          {
            oprot.DecrementRecursionDepth();
          }
        }

        public override bool Equals(object? that)
        {
          if (that is not RowsSet_SetContext_result other) return false;
          if (ReferenceEquals(this, other)) return true;
          return ((__isset.@e == other.__isset.@e) && ((!__isset.@e) || (global::System.Object.Equals(E, other.E))));
        }

        public override int GetHashCode() {
          int hashcode = 157;
          unchecked {
            if((E != null) && __isset.@e)
            {
              hashcode = (hashcode * 397) + E.GetHashCode();
            }
          }
          return hashcode;
        }

        public override string ToString()
        {
          var tmp411 = new StringBuilder("RowsSet_SetContext_result(");
          int tmp412 = 0;
          if((E != null) && __isset.@e)
          {
            if(0 < tmp412++) { tmp411.Append(", "); }
            tmp411.Append("E: ");
            E.ToString(tmp411);
          }
          tmp411.Append(')');
          return tmp411.ToString();
        }
      }


      public partial class RowsSet_GetRows_args : TBase
      {
        private int _count;

        public int ObjectHandle { get; set; } = 0;

        public int Count
        {
          get
          {
            return _count;
          }
          set
          {
            __isset.@count = true;
            this._count = value;
          }
        }


        public Isset __isset;
        public struct Isset
        {
          public bool @count;
        }

        public RowsSet_GetRows_args()
        {
        }

        public RowsSet_GetRows_args(int object_handle) : this()
        {
          this.ObjectHandle = object_handle;
        }

        public async global::System.Threading.Tasks.Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken)
        {
          iprot.IncrementRecursionDepth();
          try
          {
            bool isset_object_handle = false;
            TField field;
            await iprot.ReadStructBeginAsync(cancellationToken);
            while (true)
            {
              field = await iprot.ReadFieldBeginAsync(cancellationToken);
              if (field.Type == TType.Stop)
              {
                break;
              }

              switch (field.ID)
              {
                case 1:
                  if (field.Type == TType.I32)
                  {
                    ObjectHandle = await iprot.ReadI32Async(cancellationToken);
                    isset_object_handle = true;
                  }
                  else
                  {
                    await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
                  }
                  break;
                case 2:
                  if (field.Type == TType.I32)
                  {
                    Count = await iprot.ReadI32Async(cancellationToken);
                  }
                  else
                  {
                    await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
                  }
                  break;
                default: 
                  await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
                  break;
              }

              await iprot.ReadFieldEndAsync(cancellationToken);
            }

            await iprot.ReadStructEndAsync(cancellationToken);
            if (!isset_object_handle)
            {
              throw new TProtocolException(TProtocolException.INVALID_DATA);
            }
          }
          finally
          {
            iprot.DecrementRecursionDepth();
          }
        }

        public async global::System.Threading.Tasks.Task WriteAsync(TProtocol oprot, CancellationToken cancellationToken)
        {
          oprot.IncrementRecursionDepth();
          try
          {
            var tmp413 = new TStruct("RowsSet_GetRows_args");
            await oprot.WriteStructBeginAsync(tmp413, cancellationToken);
            var tmp414 = new TField();
            tmp414.Name = "object_handle";
            tmp414.Type = TType.I32;
            tmp414.ID = 1;
            await oprot.WriteFieldBeginAsync(tmp414, cancellationToken);
            await oprot.WriteI32Async(ObjectHandle, cancellationToken);
            await oprot.WriteFieldEndAsync(cancellationToken);
            if(__isset.@count)
            {
              tmp414.Name = "count";
              tmp414.Type = TType.I32;
              tmp414.ID = 2;
              await oprot.WriteFieldBeginAsync(tmp414, cancellationToken);
              await oprot.WriteI32Async(Count, cancellationToken);
              await oprot.WriteFieldEndAsync(cancellationToken);
            }
            await oprot.WriteFieldStopAsync(cancellationToken);
            await oprot.WriteStructEndAsync(cancellationToken);
          }
          finally
          {
            oprot.DecrementRecursionDepth();
          }
        }

        public override bool Equals(object? that)
        {
          if (that is not RowsSet_GetRows_args other) return false;
          if (ReferenceEquals(this, other)) return true;
          return global::System.Object.Equals(ObjectHandle, other.ObjectHandle)
            && ((__isset.@count == other.__isset.@count) && ((!__isset.@count) || (global::System.Object.Equals(Count, other.Count))));
        }

        public override int GetHashCode() {
          int hashcode = 157;
          unchecked {
            hashcode = (hashcode * 397) + ObjectHandle.GetHashCode();
            if(__isset.@count)
            {
              hashcode = (hashcode * 397) + Count.GetHashCode();
            }
          }
          return hashcode;
        }

        public override string ToString()
        {
          var tmp415 = new StringBuilder("RowsSet_GetRows_args(");
          tmp415.Append(", ObjectHandle: ");
          ObjectHandle.ToString(tmp415);
          if(__isset.@count)
          {
            tmp415.Append(", Count: ");
            Count.ToString(tmp415);
          }
          tmp415.Append(')');
          return tmp415.ToString();
        }
      }


      public partial class RowsSet_GetRows_result : TBase
      {
        private global::QueryCat.Plugins.Sdk.RowsList? _success;
        private global::QueryCat.Plugins.Sdk.QueryCatPluginException? _e;

        public global::QueryCat.Plugins.Sdk.RowsList? Success
        {
          get
          {
            return _success;
          }
          set
          {
            __isset.@success = true;
            this._success = value;
          }
        }

        public global::QueryCat.Plugins.Sdk.QueryCatPluginException? E
        {
          get
          {
            return _e;
          }
          set
          {
            __isset.@e = true;
            this._e = value;
          }
        }


        public Isset __isset;
        public struct Isset
        {
          public bool @success;
          public bool @e;
        }

        public RowsSet_GetRows_result()
        {
        }

        public async global::System.Threading.Tasks.Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken)
        {
          iprot.IncrementRecursionDepth();
          try
          {
            TField field;
            await iprot.ReadStructBeginAsync(cancellationToken);
            while (true)
            {
              field = await iprot.ReadFieldBeginAsync(cancellationToken);
              if (field.Type == TType.Stop)
              {
                break;
              }

              switch (field.ID)
              {
                case 0:
                  if (field.Type == TType.Struct)
                  {
                    Success = new global::QueryCat.Plugins.Sdk.RowsList();
                    await Success.ReadAsync(iprot, cancellationToken);
                  }
                  else
                  {
                    await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
                  }
                  break;
                case 1:
                  if (field.Type == TType.Struct)
                  {
                    E = new global::QueryCat.Plugins.Sdk.QueryCatPluginException();
                    await E.ReadAsync(iprot, cancellationToken);
                  }
                  else
                  {
                    await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
                  }
                  break;
                default: 
                  await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
                  break;
              }

              await iprot.ReadFieldEndAsync(cancellationToken);
            }

            await iprot.ReadStructEndAsync(cancellationToken);
          }
          finally
          {
            iprot.DecrementRecursionDepth();
          }
        }

        public async global::System.Threading.Tasks.Task WriteAsync(TProtocol oprot, CancellationToken cancellationToken)
        {
          oprot.IncrementRecursionDepth();
          try
          {
            var tmp417 = new TStruct("RowsSet_GetRows_result");
            await oprot.WriteStructBeginAsync(tmp417, cancellationToken);
            var tmp418 = new TField();

            if(this.__isset.@success)
            {
              if (Success != null)
              {
                tmp418.Name = "Success";
                tmp418.Type = TType.Struct;
                tmp418.ID = 0;
                await oprot.WriteFieldBeginAsync(tmp418, cancellationToken);
                await Success.WriteAsync(oprot, cancellationToken);
                await oprot.WriteFieldEndAsync(cancellationToken);
              }
            }
            else if(this.__isset.@e)
            {
              if (E != null)
              {
                tmp418.Name = "E";
                tmp418.Type = TType.Struct;
                tmp418.ID = 1;
                await oprot.WriteFieldBeginAsync(tmp418, cancellationToken);
                await E.WriteAsync(oprot, cancellationToken);
                await oprot.WriteFieldEndAsync(cancellationToken);
              }
            }
            await oprot.WriteFieldStopAsync(cancellationToken);
            await oprot.WriteStructEndAsync(cancellationToken);
          }
          finally
          {
            oprot.DecrementRecursionDepth();
          }
        }

        public override bool Equals(object? that)
        {
          if (that is not RowsSet_GetRows_result other) return false;
          if (ReferenceEquals(this, other)) return true;
          return ((__isset.@success == other.__isset.@success) && ((!__isset.@success) || (global::System.Object.Equals(Success, other.Success))))
            && ((__isset.@e == other.__isset.@e) && ((!__isset.@e) || (global::System.Object.Equals(E, other.E))));
        }

        public override int GetHashCode() {
          int hashcode = 157;
          unchecked {
            if((Success != null) && __isset.@success)
            {
              hashcode = (hashcode * 397) + Success.GetHashCode();
            }
            if((E != null) && __isset.@e)
            {
              hashcode = (hashcode * 397) + E.GetHashCode();
            }
          }
          return hashcode;
        }

        public override string ToString()
        {
          var tmp419 = new StringBuilder("RowsSet_GetRows_result(");
          int tmp420 = 0;
          if((Success != null) && __isset.@success)
          {
            if(0 < tmp420++) { tmp419.Append(", "); }
            tmp419.Append("Success: ");
            Success.ToString(tmp419);
          }
          if((E != null) && __isset.@e)
          {
            if(0 < tmp420++) { tmp419.Append(", "); }
            tmp419.Append("E: ");
            E.ToString(tmp419);
          }
          tmp419.Append(')');
          return tmp419.ToString();
        }
      }


      public partial class RowsSet_GetUniqueKey_args : TBase
      {

        public int ObjectHandle { get; set; } = 0;

        public RowsSet_GetUniqueKey_args()
        {
        }

        public RowsSet_GetUniqueKey_args(int object_handle) : this()
        {
          this.ObjectHandle = object_handle;
        }

        public async global::System.Threading.Tasks.Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken)
        {
          iprot.IncrementRecursionDepth();
          try
          {
            bool isset_object_handle = false;
            TField field;
            await iprot.ReadStructBeginAsync(cancellationToken);
            while (true)
            {
              field = await iprot.ReadFieldBeginAsync(cancellationToken);
              if (field.Type == TType.Stop)
              {
                break;
              }

              switch (field.ID)
              {
                case 1:
                  if (field.Type == TType.I32)
                  {
                    ObjectHandle = await iprot.ReadI32Async(cancellationToken);
                    isset_object_handle = true;
                  }
                  else
                  {
                    await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
                  }
                  break;
                default: 
                  await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
                  break;
              }

              await iprot.ReadFieldEndAsync(cancellationToken);
            }

            await iprot.ReadStructEndAsync(cancellationToken);
            if (!isset_object_handle)
            {
              throw new TProtocolException(TProtocolException.INVALID_DATA);
            }
          }
          finally
          {
            iprot.DecrementRecursionDepth();
          }
        }

        public async global::System.Threading.Tasks.Task WriteAsync(TProtocol oprot, CancellationToken cancellationToken)
        {
          oprot.IncrementRecursionDepth();
          try
          {
            var tmp421 = new TStruct("RowsSet_GetUniqueKey_args");
            await oprot.WriteStructBeginAsync(tmp421, cancellationToken);
            var tmp422 = new TField();
            tmp422.Name = "object_handle";
            tmp422.Type = TType.I32;
            tmp422.ID = 1;
            await oprot.WriteFieldBeginAsync(tmp422, cancellationToken);
            await oprot.WriteI32Async(ObjectHandle, cancellationToken);
            await oprot.WriteFieldEndAsync(cancellationToken);
            await oprot.WriteFieldStopAsync(cancellationToken);
            await oprot.WriteStructEndAsync(cancellationToken);
          }
          finally
          {
            oprot.DecrementRecursionDepth();
          }
        }

        public override bool Equals(object? that)
        {
          if (that is not RowsSet_GetUniqueKey_args other) return false;
          if (ReferenceEquals(this, other)) return true;
          return global::System.Object.Equals(ObjectHandle, other.ObjectHandle);
        }

        public override int GetHashCode() {
          int hashcode = 157;
          unchecked {
            hashcode = (hashcode * 397) + ObjectHandle.GetHashCode();
          }
          return hashcode;
        }

        public override string ToString()
        {
          var tmp423 = new StringBuilder("RowsSet_GetUniqueKey_args(");
          tmp423.Append(", ObjectHandle: ");
          ObjectHandle.ToString(tmp423);
          tmp423.Append(')');
          return tmp423.ToString();
        }
      }


      public partial class RowsSet_GetUniqueKey_result : TBase
      {
        private List<string>? _success;
        private global::QueryCat.Plugins.Sdk.QueryCatPluginException? _e;

        public List<string>? Success
        {
          get
          {
            return _success;
          }
          set
          {
            __isset.@success = true;
            this._success = value;
          }
        }

        public global::QueryCat.Plugins.Sdk.QueryCatPluginException? E
        {
          get
          {
            return _e;
          }
          set
          {
            __isset.@e = true;
            this._e = value;
          }
        }


        public Isset __isset;
        public struct Isset
        {
          public bool @success;
          public bool @e;
        }

        public RowsSet_GetUniqueKey_result()
        {
        }

        public async global::System.Threading.Tasks.Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken)
        {
          iprot.IncrementRecursionDepth();
          try
          {
            TField field;
            await iprot.ReadStructBeginAsync(cancellationToken);
            while (true)
            {
              field = await iprot.ReadFieldBeginAsync(cancellationToken);
              if (field.Type == TType.Stop)
              {
                break;
              }

              switch (field.ID)
              {
                case 0:
                  if (field.Type == TType.List)
                  {
                    {
                      var _list425 = await iprot.ReadListBeginAsync(cancellationToken);
                      Success = new List<string>(_list425.Count);
                      for(int _i426 = 0; _i426 < _list425.Count; ++_i426)
                      {
                        string _elem427;
                        _elem427 = await iprot.ReadStringAsync(cancellationToken);
                        Success.Add(_elem427);
                      }
                      await iprot.ReadListEndAsync(cancellationToken);
                    }
                  }
                  else
                  {
                    await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
                  }
                  break;
                case 1:
                  if (field.Type == TType.Struct)
                  {
                    E = new global::QueryCat.Plugins.Sdk.QueryCatPluginException();
                    await E.ReadAsync(iprot, cancellationToken);
                  }
                  else
                  {
                    await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
                  }
                  break;
                default: 
                  await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
                  break;
              }

              await iprot.ReadFieldEndAsync(cancellationToken);
            }

            await iprot.ReadStructEndAsync(cancellationToken);
          }
          finally
          {
            iprot.DecrementRecursionDepth();
          }
        }

        public async global::System.Threading.Tasks.Task WriteAsync(TProtocol oprot, CancellationToken cancellationToken)
        {
          oprot.IncrementRecursionDepth();
          try
          {
            var tmp428 = new TStruct("RowsSet_GetUniqueKey_result");
            await oprot.WriteStructBeginAsync(tmp428, cancellationToken);
            var tmp429 = new TField();

            if(this.__isset.@success)
            {
              if (Success != null)
              {
                tmp429.Name = "Success";
                tmp429.Type = TType.List;
                tmp429.ID = 0;
                await oprot.WriteFieldBeginAsync(tmp429, cancellationToken);
                await oprot.WriteListBeginAsync(new TList(TType.String, Success.Count), cancellationToken);
                foreach (string _iter430 in Success)
                {
                  await oprot.WriteStringAsync(_iter430, cancellationToken);
                }
                await oprot.WriteListEndAsync(cancellationToken);
                await oprot.WriteFieldEndAsync(cancellationToken);
              }
            }
            else if(this.__isset.@e)
            {
              if (E != null)
              {
                tmp429.Name = "E";
                tmp429.Type = TType.Struct;
                tmp429.ID = 1;
                await oprot.WriteFieldBeginAsync(tmp429, cancellationToken);
                await E.WriteAsync(oprot, cancellationToken);
                await oprot.WriteFieldEndAsync(cancellationToken);
              }
            }
            await oprot.WriteFieldStopAsync(cancellationToken);
            await oprot.WriteStructEndAsync(cancellationToken);
          }
          finally
          {
            oprot.DecrementRecursionDepth();
          }
        }

        public override bool Equals(object? that)
        {
          if (that is not RowsSet_GetUniqueKey_result other) return false;
          if (ReferenceEquals(this, other)) return true;
          return ((__isset.@success == other.__isset.@success) && ((!__isset.@success) || (TCollections.Equals(Success, other.Success))))
            && ((__isset.@e == other.__isset.@e) && ((!__isset.@e) || (global::System.Object.Equals(E, other.E))));
        }

        public override int GetHashCode() {
          int hashcode = 157;
          unchecked {
            if((Success != null) && __isset.@success)
            {
              hashcode = (hashcode * 397) + TCollections.GetHashCode(Success);
            }
            if((E != null) && __isset.@e)
            {
              hashcode = (hashcode * 397) + E.GetHashCode();
            }
          }
          return hashcode;
        }

        public override string ToString()
        {
          var tmp431 = new StringBuilder("RowsSet_GetUniqueKey_result(");
          int tmp432 = 0;
          if((Success != null) && __isset.@success)
          {
            if(0 < tmp432++) { tmp431.Append(", "); }
            tmp431.Append("Success: ");
            Success.ToString(tmp431);
          }
          if((E != null) && __isset.@e)
          {
            if(0 < tmp432++) { tmp431.Append(", "); }
            tmp431.Append("E: ");
            E.ToString(tmp431);
          }
          tmp431.Append(')');
          return tmp431.ToString();
        }
      }


      public partial class RowsSet_GetKeyColumns_args : TBase
      {
        private int _object_handle;

        public int ObjectHandle
        {
          get
          {
            return _object_handle;
          }
          set
          {
            __isset.object_handle = true;
            this._object_handle = value;
          }
        }


        public Isset __isset;
        public struct Isset
        {
          public bool object_handle;
        }

        public RowsSet_GetKeyColumns_args()
        {
        }

        public async global::System.Threading.Tasks.Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken)
        {
          iprot.IncrementRecursionDepth();
          try
          {
            TField field;
            await iprot.ReadStructBeginAsync(cancellationToken);
            while (true)
            {
              field = await iprot.ReadFieldBeginAsync(cancellationToken);
              if (field.Type == TType.Stop)
              {
                break;
              }

              switch (field.ID)
              {
                case 1:
                  if (field.Type == TType.I32)
                  {
                    ObjectHandle = await iprot.ReadI32Async(cancellationToken);
                  }
                  else
                  {
                    await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
                  }
                  break;
                default: 
                  await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
                  break;
              }

              await iprot.ReadFieldEndAsync(cancellationToken);
            }

            await iprot.ReadStructEndAsync(cancellationToken);
          }
          finally
          {
            iprot.DecrementRecursionDepth();
          }
        }

        public async global::System.Threading.Tasks.Task WriteAsync(TProtocol oprot, CancellationToken cancellationToken)
        {
          oprot.IncrementRecursionDepth();
          try
          {
            var tmp433 = new TStruct("RowsSet_GetKeyColumns_args");
            await oprot.WriteStructBeginAsync(tmp433, cancellationToken);
            var tmp434 = new TField();
            if(__isset.object_handle)
            {
              tmp434.Name = "object_handle";
              tmp434.Type = TType.I32;
              tmp434.ID = 1;
              await oprot.WriteFieldBeginAsync(tmp434, cancellationToken);
              await oprot.WriteI32Async(ObjectHandle, cancellationToken);
              await oprot.WriteFieldEndAsync(cancellationToken);
            }
            await oprot.WriteFieldStopAsync(cancellationToken);
            await oprot.WriteStructEndAsync(cancellationToken);
          }
          finally
          {
            oprot.DecrementRecursionDepth();
          }
        }

        public override bool Equals(object? that)
        {
          if (that is not RowsSet_GetKeyColumns_args other) return false;
          if (ReferenceEquals(this, other)) return true;
          return ((__isset.object_handle == other.__isset.object_handle) && ((!__isset.object_handle) || (global::System.Object.Equals(ObjectHandle, other.ObjectHandle))));
        }

        public override int GetHashCode() {
          int hashcode = 157;
          unchecked {
            if(__isset.object_handle)
            {
              hashcode = (hashcode * 397) + ObjectHandle.GetHashCode();
            }
          }
          return hashcode;
        }

        public override string ToString()
        {
          var tmp435 = new StringBuilder("RowsSet_GetKeyColumns_args(");
          int tmp436 = 0;
          if(__isset.object_handle)
          {
            if(0 < tmp436++) { tmp435.Append(", "); }
            tmp435.Append("ObjectHandle: ");
            ObjectHandle.ToString(tmp435);
          }
          tmp435.Append(')');
          return tmp435.ToString();
        }
      }


      public partial class RowsSet_GetKeyColumns_result : TBase
      {
        private List<global::QueryCat.Plugins.Sdk.KeyColumn>? _success;

        public List<global::QueryCat.Plugins.Sdk.KeyColumn>? Success
        {
          get
          {
            return _success;
          }
          set
          {
            __isset.@success = true;
            this._success = value;
          }
        }


        public Isset __isset;
        public struct Isset
        {
          public bool @success;
        }

        public RowsSet_GetKeyColumns_result()
        {
        }

        public async global::System.Threading.Tasks.Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken)
        {
          iprot.IncrementRecursionDepth();
          try
          {
            TField field;
            await iprot.ReadStructBeginAsync(cancellationToken);
            while (true)
            {
              field = await iprot.ReadFieldBeginAsync(cancellationToken);
              if (field.Type == TType.Stop)
              {
                break;
              }

              switch (field.ID)
              {
                case 0:
                  if (field.Type == TType.List)
                  {
                    {
                      var _list437 = await iprot.ReadListBeginAsync(cancellationToken);
                      Success = new List<global::QueryCat.Plugins.Sdk.KeyColumn>(_list437.Count);
                      for(int _i438 = 0; _i438 < _list437.Count; ++_i438)
                      {
                        global::QueryCat.Plugins.Sdk.KeyColumn _elem439;
                        _elem439 = new global::QueryCat.Plugins.Sdk.KeyColumn();
                        await _elem439.ReadAsync(iprot, cancellationToken);
                        Success.Add(_elem439);
                      }
                      await iprot.ReadListEndAsync(cancellationToken);
                    }
                  }
                  else
                  {
                    await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
                  }
                  break;
                default: 
                  await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
                  break;
              }

              await iprot.ReadFieldEndAsync(cancellationToken);
            }

            await iprot.ReadStructEndAsync(cancellationToken);
          }
          finally
          {
            iprot.DecrementRecursionDepth();
          }
        }

        public async global::System.Threading.Tasks.Task WriteAsync(TProtocol oprot, CancellationToken cancellationToken)
        {
          oprot.IncrementRecursionDepth();
          try
          {
            var tmp440 = new TStruct("RowsSet_GetKeyColumns_result");
            await oprot.WriteStructBeginAsync(tmp440, cancellationToken);
            var tmp441 = new TField();

            if(this.__isset.@success)
            {
              if (Success != null)
              {
                tmp441.Name = "Success";
                tmp441.Type = TType.List;
                tmp441.ID = 0;
                await oprot.WriteFieldBeginAsync(tmp441, cancellationToken);
                await oprot.WriteListBeginAsync(new TList(TType.Struct, Success.Count), cancellationToken);
                foreach (global::QueryCat.Plugins.Sdk.KeyColumn _iter442 in Success)
                {
                  await _iter442.WriteAsync(oprot, cancellationToken);
                }
                await oprot.WriteListEndAsync(cancellationToken);
                await oprot.WriteFieldEndAsync(cancellationToken);
              }
            }
            await oprot.WriteFieldStopAsync(cancellationToken);
            await oprot.WriteStructEndAsync(cancellationToken);
          }
          finally
          {
            oprot.DecrementRecursionDepth();
          }
        }

        public override bool Equals(object? that)
        {
          if (that is not RowsSet_GetKeyColumns_result other) return false;
          if (ReferenceEquals(this, other)) return true;
          return ((__isset.@success == other.__isset.@success) && ((!__isset.@success) || (TCollections.Equals(Success, other.Success))));
        }

        public override int GetHashCode() {
          int hashcode = 157;
          unchecked {
            if((Success != null) && __isset.@success)
            {
              hashcode = (hashcode * 397) + TCollections.GetHashCode(Success);
            }
          }
          return hashcode;
        }

        public override string ToString()
        {
          var tmp443 = new StringBuilder("RowsSet_GetKeyColumns_result(");
          int tmp444 = 0;
          if((Success != null) && __isset.@success)
          {
            if(0 < tmp444++) { tmp443.Append(", "); }
            tmp443.Append("Success: ");
            Success.ToString(tmp443);
          }
          tmp443.Append(')');
          return tmp443.ToString();
        }
      }


      public partial class RowsSet_SetKeyColumnValue_args : TBase
      {

        public int ObjectHandle { get; set; } = 0;

        public int ColumnIndex { get; set; } = 0;

        public string Operation { get; set; } = string.Empty;

        public global::QueryCat.Plugins.Sdk.VariantValue? Value { get; set; }

        public RowsSet_SetKeyColumnValue_args()
        {
        }

        public RowsSet_SetKeyColumnValue_args(int object_handle, int column_index, string @operation, global::QueryCat.Plugins.Sdk.VariantValue? @value) : this()
        {
          this.ObjectHandle = object_handle;
          this.ColumnIndex = column_index;
          this.Operation = @operation;
          this.Value = @value;
        }

        public async global::System.Threading.Tasks.Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken)
        {
          iprot.IncrementRecursionDepth();
          try
          {
            bool isset_object_handle = false;
            bool isset_column_index = false;
            bool isset_operation = false;
            bool isset_value = false;
            TField field;
            await iprot.ReadStructBeginAsync(cancellationToken);
            while (true)
            {
              field = await iprot.ReadFieldBeginAsync(cancellationToken);
              if (field.Type == TType.Stop)
              {
                break;
              }

              switch (field.ID)
              {
                case 1:
                  if (field.Type == TType.I32)
                  {
                    ObjectHandle = await iprot.ReadI32Async(cancellationToken);
                    isset_object_handle = true;
                  }
                  else
                  {
                    await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
                  }
                  break;
                case 2:
                  if (field.Type == TType.I32)
                  {
                    ColumnIndex = await iprot.ReadI32Async(cancellationToken);
                    isset_column_index = true;
                  }
                  else
                  {
                    await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
                  }
                  break;
                case 3:
                  if (field.Type == TType.String)
                  {
                    Operation = await iprot.ReadStringAsync(cancellationToken);
                    isset_operation = true;
                  }
                  else
                  {
                    await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
                  }
                  break;
                case 4:
                  if (field.Type == TType.Struct)
                  {
                    Value = new global::QueryCat.Plugins.Sdk.VariantValue();
                    await Value.ReadAsync(iprot, cancellationToken);
                    isset_value = true;
                  }
                  else
                  {
                    await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
                  }
                  break;
                default: 
                  await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
                  break;
              }

              await iprot.ReadFieldEndAsync(cancellationToken);
            }

            await iprot.ReadStructEndAsync(cancellationToken);
            if (!isset_object_handle)
            {
              throw new TProtocolException(TProtocolException.INVALID_DATA);
            }
            if (!isset_column_index)
            {
              throw new TProtocolException(TProtocolException.INVALID_DATA);
            }
            if (!isset_operation)
            {
              throw new TProtocolException(TProtocolException.INVALID_DATA);
            }
            if (!isset_value)
            {
              throw new TProtocolException(TProtocolException.INVALID_DATA);
            }
          }
          finally
          {
            iprot.DecrementRecursionDepth();
          }
        }

        public async global::System.Threading.Tasks.Task WriteAsync(TProtocol oprot, CancellationToken cancellationToken)
        {
          oprot.IncrementRecursionDepth();
          try
          {
            var tmp445 = new TStruct("RowsSet_SetKeyColumnValue_args");
            await oprot.WriteStructBeginAsync(tmp445, cancellationToken);
            var tmp446 = new TField();
            tmp446.Name = "object_handle";
            tmp446.Type = TType.I32;
            tmp446.ID = 1;
            await oprot.WriteFieldBeginAsync(tmp446, cancellationToken);
            await oprot.WriteI32Async(ObjectHandle, cancellationToken);
            await oprot.WriteFieldEndAsync(cancellationToken);
            tmp446.Name = "column_index";
            tmp446.Type = TType.I32;
            tmp446.ID = 2;
            await oprot.WriteFieldBeginAsync(tmp446, cancellationToken);
            await oprot.WriteI32Async(ColumnIndex, cancellationToken);
            await oprot.WriteFieldEndAsync(cancellationToken);
            if((Operation != null))
            {
              tmp446.Name = "operation";
              tmp446.Type = TType.String;
              tmp446.ID = 3;
              await oprot.WriteFieldBeginAsync(tmp446, cancellationToken);
              await oprot.WriteStringAsync(Operation, cancellationToken);
              await oprot.WriteFieldEndAsync(cancellationToken);
            }
            if((Value != null))
            {
              tmp446.Name = "value";
              tmp446.Type = TType.Struct;
              tmp446.ID = 4;
              await oprot.WriteFieldBeginAsync(tmp446, cancellationToken);
              await Value.WriteAsync(oprot, cancellationToken);
              await oprot.WriteFieldEndAsync(cancellationToken);
            }
            await oprot.WriteFieldStopAsync(cancellationToken);
            await oprot.WriteStructEndAsync(cancellationToken);
          }
          finally
          {
            oprot.DecrementRecursionDepth();
          }
        }

        public override bool Equals(object? that)
        {
          if (that is not RowsSet_SetKeyColumnValue_args other) return false;
          if (ReferenceEquals(this, other)) return true;
          return global::System.Object.Equals(ObjectHandle, other.ObjectHandle)
            && global::System.Object.Equals(ColumnIndex, other.ColumnIndex)
            && global::System.Object.Equals(Operation, other.Operation)
            && global::System.Object.Equals(Value, other.Value);
        }

        public override int GetHashCode() {
          int hashcode = 157;
          unchecked {
            hashcode = (hashcode * 397) + ObjectHandle.GetHashCode();
            hashcode = (hashcode * 397) + ColumnIndex.GetHashCode();
            if((Operation != null))
            {
              hashcode = (hashcode * 397) + Operation.GetHashCode();
            }
            if((Value != null))
            {
              hashcode = (hashcode * 397) + Value.GetHashCode();
            }
          }
          return hashcode;
        }

        public override string ToString()
        {
          var tmp447 = new StringBuilder("RowsSet_SetKeyColumnValue_args(");
          tmp447.Append(", ObjectHandle: ");
          ObjectHandle.ToString(tmp447);
          tmp447.Append(", ColumnIndex: ");
          ColumnIndex.ToString(tmp447);
          if((Operation != null))
          {
            tmp447.Append(", Operation: ");
            Operation.ToString(tmp447);
          }
          if((Value != null))
          {
            tmp447.Append(", Value: ");
            Value.ToString(tmp447);
          }
          tmp447.Append(')');
          return tmp447.ToString();
        }
      }


      public partial class RowsSet_SetKeyColumnValue_result : TBase
      {

        public RowsSet_SetKeyColumnValue_result()
        {
        }

        public async global::System.Threading.Tasks.Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken)
        {
          iprot.IncrementRecursionDepth();
          try
          {
            TField field;
            await iprot.ReadStructBeginAsync(cancellationToken);
            while (true)
            {
              field = await iprot.ReadFieldBeginAsync(cancellationToken);
              if (field.Type == TType.Stop)
              {
                break;
              }

              switch (field.ID)
              {
                default: 
                  await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
                  break;
              }

              await iprot.ReadFieldEndAsync(cancellationToken);
            }

            await iprot.ReadStructEndAsync(cancellationToken);
          }
          finally
          {
            iprot.DecrementRecursionDepth();
          }
        }

        public async global::System.Threading.Tasks.Task WriteAsync(TProtocol oprot, CancellationToken cancellationToken)
        {
          oprot.IncrementRecursionDepth();
          try
          {
            var tmp449 = new TStruct("RowsSet_SetKeyColumnValue_result");
            await oprot.WriteStructBeginAsync(tmp449, cancellationToken);
            await oprot.WriteFieldStopAsync(cancellationToken);
            await oprot.WriteStructEndAsync(cancellationToken);
          }
          finally
          {
            oprot.DecrementRecursionDepth();
          }
        }

        public override bool Equals(object? that)
        {
          if (that is not RowsSet_SetKeyColumnValue_result other) return false;
          if (ReferenceEquals(this, other)) return true;
          return true;
        }

        public override int GetHashCode() {
          int hashcode = 157;
          unchecked {
          }
          return hashcode;
        }

        public override string ToString()
        {
          var tmp450 = new StringBuilder("RowsSet_SetKeyColumnValue_result(");
          tmp450.Append(')');
          return tmp450.ToString();
        }
      }


      public partial class RowsSet_UpdateValue_args : TBase
      {

        public int ObjectHandle { get; set; } = 0;

        public int ColumnIndex { get; set; } = 0;

        public global::QueryCat.Plugins.Sdk.VariantValue? Value { get; set; }

        public RowsSet_UpdateValue_args()
        {
        }

        public RowsSet_UpdateValue_args(int object_handle, int column_index, global::QueryCat.Plugins.Sdk.VariantValue? @value) : this()
        {
          this.ObjectHandle = object_handle;
          this.ColumnIndex = column_index;
          this.Value = @value;
        }

        public async global::System.Threading.Tasks.Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken)
        {
          iprot.IncrementRecursionDepth();
          try
          {
            bool isset_object_handle = false;
            bool isset_column_index = false;
            bool isset_value = false;
            TField field;
            await iprot.ReadStructBeginAsync(cancellationToken);
            while (true)
            {
              field = await iprot.ReadFieldBeginAsync(cancellationToken);
              if (field.Type == TType.Stop)
              {
                break;
              }

              switch (field.ID)
              {
                case 1:
                  if (field.Type == TType.I32)
                  {
                    ObjectHandle = await iprot.ReadI32Async(cancellationToken);
                    isset_object_handle = true;
                  }
                  else
                  {
                    await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
                  }
                  break;
                case 2:
                  if (field.Type == TType.I32)
                  {
                    ColumnIndex = await iprot.ReadI32Async(cancellationToken);
                    isset_column_index = true;
                  }
                  else
                  {
                    await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
                  }
                  break;
                case 3:
                  if (field.Type == TType.Struct)
                  {
                    Value = new global::QueryCat.Plugins.Sdk.VariantValue();
                    await Value.ReadAsync(iprot, cancellationToken);
                    isset_value = true;
                  }
                  else
                  {
                    await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
                  }
                  break;
                default: 
                  await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
                  break;
              }

              await iprot.ReadFieldEndAsync(cancellationToken);
            }

            await iprot.ReadStructEndAsync(cancellationToken);
            if (!isset_object_handle)
            {
              throw new TProtocolException(TProtocolException.INVALID_DATA);
            }
            if (!isset_column_index)
            {
              throw new TProtocolException(TProtocolException.INVALID_DATA);
            }
            if (!isset_value)
            {
              throw new TProtocolException(TProtocolException.INVALID_DATA);
            }
          }
          finally
          {
            iprot.DecrementRecursionDepth();
          }
        }

        public async global::System.Threading.Tasks.Task WriteAsync(TProtocol oprot, CancellationToken cancellationToken)
        {
          oprot.IncrementRecursionDepth();
          try
          {
            var tmp452 = new TStruct("RowsSet_UpdateValue_args");
            await oprot.WriteStructBeginAsync(tmp452, cancellationToken);
            var tmp453 = new TField();
            tmp453.Name = "object_handle";
            tmp453.Type = TType.I32;
            tmp453.ID = 1;
            await oprot.WriteFieldBeginAsync(tmp453, cancellationToken);
            await oprot.WriteI32Async(ObjectHandle, cancellationToken);
            await oprot.WriteFieldEndAsync(cancellationToken);
            tmp453.Name = "column_index";
            tmp453.Type = TType.I32;
            tmp453.ID = 2;
            await oprot.WriteFieldBeginAsync(tmp453, cancellationToken);
            await oprot.WriteI32Async(ColumnIndex, cancellationToken);
            await oprot.WriteFieldEndAsync(cancellationToken);
            if((Value != null))
            {
              tmp453.Name = "value";
              tmp453.Type = TType.Struct;
              tmp453.ID = 3;
              await oprot.WriteFieldBeginAsync(tmp453, cancellationToken);
              await Value.WriteAsync(oprot, cancellationToken);
              await oprot.WriteFieldEndAsync(cancellationToken);
            }
            await oprot.WriteFieldStopAsync(cancellationToken);
            await oprot.WriteStructEndAsync(cancellationToken);
          }
          finally
          {
            oprot.DecrementRecursionDepth();
          }
        }

        public override bool Equals(object? that)
        {
          if (that is not RowsSet_UpdateValue_args other) return false;
          if (ReferenceEquals(this, other)) return true;
          return global::System.Object.Equals(ObjectHandle, other.ObjectHandle)
            && global::System.Object.Equals(ColumnIndex, other.ColumnIndex)
            && global::System.Object.Equals(Value, other.Value);
        }

        public override int GetHashCode() {
          int hashcode = 157;
          unchecked {
            hashcode = (hashcode * 397) + ObjectHandle.GetHashCode();
            hashcode = (hashcode * 397) + ColumnIndex.GetHashCode();
            if((Value != null))
            {
              hashcode = (hashcode * 397) + Value.GetHashCode();
            }
          }
          return hashcode;
        }

        public override string ToString()
        {
          var tmp454 = new StringBuilder("RowsSet_UpdateValue_args(");
          tmp454.Append(", ObjectHandle: ");
          ObjectHandle.ToString(tmp454);
          tmp454.Append(", ColumnIndex: ");
          ColumnIndex.ToString(tmp454);
          if((Value != null))
          {
            tmp454.Append(", Value: ");
            Value.ToString(tmp454);
          }
          tmp454.Append(')');
          return tmp454.ToString();
        }
      }


      public partial class RowsSet_UpdateValue_result : TBase
      {
        private bool _success;
        private global::QueryCat.Plugins.Sdk.QueryCatPluginException? _e;

        public bool Success
        {
          get
          {
            return _success;
          }
          set
          {
            __isset.@success = true;
            this._success = value;
          }
        }

        public global::QueryCat.Plugins.Sdk.QueryCatPluginException? E
        {
          get
          {
            return _e;
          }
          set
          {
            __isset.@e = true;
            this._e = value;
          }
        }


        public Isset __isset;
        public struct Isset
        {
          public bool @success;
          public bool @e;
        }

        public RowsSet_UpdateValue_result()
        {
        }

        public async global::System.Threading.Tasks.Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken)
        {
          iprot.IncrementRecursionDepth();
          try
          {
            TField field;
            await iprot.ReadStructBeginAsync(cancellationToken);
            while (true)
            {
              field = await iprot.ReadFieldBeginAsync(cancellationToken);
              if (field.Type == TType.Stop)
              {
                break;
              }

              switch (field.ID)
              {
                case 0:
                  if (field.Type == TType.Bool)
                  {
                    Success = await iprot.ReadBoolAsync(cancellationToken);
                  }
                  else
                  {
                    await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
                  }
                  break;
                case 1:
                  if (field.Type == TType.Struct)
                  {
                    E = new global::QueryCat.Plugins.Sdk.QueryCatPluginException();
                    await E.ReadAsync(iprot, cancellationToken);
                  }
                  else
                  {
                    await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
                  }
                  break;
                default: 
                  await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
                  break;
              }

              await iprot.ReadFieldEndAsync(cancellationToken);
            }

            await iprot.ReadStructEndAsync(cancellationToken);
          }
          finally
          {
            iprot.DecrementRecursionDepth();
          }
        }

        public async global::System.Threading.Tasks.Task WriteAsync(TProtocol oprot, CancellationToken cancellationToken)
        {
          oprot.IncrementRecursionDepth();
          try
          {
            var tmp456 = new TStruct("RowsSet_UpdateValue_result");
            await oprot.WriteStructBeginAsync(tmp456, cancellationToken);
            var tmp457 = new TField();

            if(this.__isset.@success)
            {
              tmp457.Name = "Success";
              tmp457.Type = TType.Bool;
              tmp457.ID = 0;
              await oprot.WriteFieldBeginAsync(tmp457, cancellationToken);
              await oprot.WriteBoolAsync(Success, cancellationToken);
              await oprot.WriteFieldEndAsync(cancellationToken);
            }
            else if(this.__isset.@e)
            {
              if (E != null)
              {
                tmp457.Name = "E";
                tmp457.Type = TType.Struct;
                tmp457.ID = 1;
                await oprot.WriteFieldBeginAsync(tmp457, cancellationToken);
                await E.WriteAsync(oprot, cancellationToken);
                await oprot.WriteFieldEndAsync(cancellationToken);
              }
            }
            await oprot.WriteFieldStopAsync(cancellationToken);
            await oprot.WriteStructEndAsync(cancellationToken);
          }
          finally
          {
            oprot.DecrementRecursionDepth();
          }
        }

        public override bool Equals(object? that)
        {
          if (that is not RowsSet_UpdateValue_result other) return false;
          if (ReferenceEquals(this, other)) return true;
          return ((__isset.@success == other.__isset.@success) && ((!__isset.@success) || (global::System.Object.Equals(Success, other.Success))))
            && ((__isset.@e == other.__isset.@e) && ((!__isset.@e) || (global::System.Object.Equals(E, other.E))));
        }

        public override int GetHashCode() {
          int hashcode = 157;
          unchecked {
            if(__isset.@success)
            {
              hashcode = (hashcode * 397) + Success.GetHashCode();
            }
            if((E != null) && __isset.@e)
            {
              hashcode = (hashcode * 397) + E.GetHashCode();
            }
          }
          return hashcode;
        }

        public override string ToString()
        {
          var tmp458 = new StringBuilder("RowsSet_UpdateValue_result(");
          int tmp459 = 0;
          if(__isset.@success)
          {
            if(0 < tmp459++) { tmp458.Append(", "); }
            tmp458.Append("Success: ");
            Success.ToString(tmp458);
          }
          if((E != null) && __isset.@e)
          {
            if(0 < tmp459++) { tmp458.Append(", "); }
            tmp458.Append("E: ");
            E.ToString(tmp458);
          }
          tmp458.Append(')');
          return tmp458.ToString();
        }
      }


      public partial class RowsSet_WriteValue_args : TBase
      {

        public int ObjectHandle { get; set; } = 0;

        public List<global::QueryCat.Plugins.Sdk.VariantValue>? Values { get; set; }

        public RowsSet_WriteValue_args()
        {
        }

        public RowsSet_WriteValue_args(int object_handle, List<global::QueryCat.Plugins.Sdk.VariantValue>? @values) : this()
        {
          this.ObjectHandle = object_handle;
          this.Values = @values;
        }

        public async global::System.Threading.Tasks.Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken)
        {
          iprot.IncrementRecursionDepth();
          try
          {
            bool isset_object_handle = false;
            bool isset_values = false;
            TField field;
            await iprot.ReadStructBeginAsync(cancellationToken);
            while (true)
            {
              field = await iprot.ReadFieldBeginAsync(cancellationToken);
              if (field.Type == TType.Stop)
              {
                break;
              }

              switch (field.ID)
              {
                case 1:
                  if (field.Type == TType.I32)
                  {
                    ObjectHandle = await iprot.ReadI32Async(cancellationToken);
                    isset_object_handle = true;
                  }
                  else
                  {
                    await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
                  }
                  break;
                case 2:
                  if (field.Type == TType.List)
                  {
                    {
                      var _list460 = await iprot.ReadListBeginAsync(cancellationToken);
                      Values = new List<global::QueryCat.Plugins.Sdk.VariantValue>(_list460.Count);
                      for(int _i461 = 0; _i461 < _list460.Count; ++_i461)
                      {
                        global::QueryCat.Plugins.Sdk.VariantValue _elem462;
                        _elem462 = new global::QueryCat.Plugins.Sdk.VariantValue();
                        await _elem462.ReadAsync(iprot, cancellationToken);
                        Values.Add(_elem462);
                      }
                      await iprot.ReadListEndAsync(cancellationToken);
                    }
                    isset_values = true;
                  }
                  else
                  {
                    await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
                  }
                  break;
                default: 
                  await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
                  break;
              }

              await iprot.ReadFieldEndAsync(cancellationToken);
            }

            await iprot.ReadStructEndAsync(cancellationToken);
            if (!isset_object_handle)
            {
              throw new TProtocolException(TProtocolException.INVALID_DATA);
            }
            if (!isset_values)
            {
              throw new TProtocolException(TProtocolException.INVALID_DATA);
            }
          }
          finally
          {
            iprot.DecrementRecursionDepth();
          }
        }

        public async global::System.Threading.Tasks.Task WriteAsync(TProtocol oprot, CancellationToken cancellationToken)
        {
          oprot.IncrementRecursionDepth();
          try
          {
            var tmp463 = new TStruct("RowsSet_WriteValue_args");
            await oprot.WriteStructBeginAsync(tmp463, cancellationToken);
            var tmp464 = new TField();
            tmp464.Name = "object_handle";
            tmp464.Type = TType.I32;
            tmp464.ID = 1;
            await oprot.WriteFieldBeginAsync(tmp464, cancellationToken);
            await oprot.WriteI32Async(ObjectHandle, cancellationToken);
            await oprot.WriteFieldEndAsync(cancellationToken);
            if((Values != null))
            {
              tmp464.Name = "values";
              tmp464.Type = TType.List;
              tmp464.ID = 2;
              await oprot.WriteFieldBeginAsync(tmp464, cancellationToken);
              await oprot.WriteListBeginAsync(new TList(TType.Struct, Values.Count), cancellationToken);
              foreach (global::QueryCat.Plugins.Sdk.VariantValue _iter465 in Values)
              {
                await _iter465.WriteAsync(oprot, cancellationToken);
              }
              await oprot.WriteListEndAsync(cancellationToken);
              await oprot.WriteFieldEndAsync(cancellationToken);
            }
            await oprot.WriteFieldStopAsync(cancellationToken);
            await oprot.WriteStructEndAsync(cancellationToken);
          }
          finally
          {
            oprot.DecrementRecursionDepth();
          }
        }

        public override bool Equals(object? that)
        {
          if (that is not RowsSet_WriteValue_args other) return false;
          if (ReferenceEquals(this, other)) return true;
          return global::System.Object.Equals(ObjectHandle, other.ObjectHandle)
            && TCollections.Equals(Values, other.Values);
        }

        public override int GetHashCode() {
          int hashcode = 157;
          unchecked {
            hashcode = (hashcode * 397) + ObjectHandle.GetHashCode();
            if((Values != null))
            {
              hashcode = (hashcode * 397) + TCollections.GetHashCode(Values);
            }
          }
          return hashcode;
        }

        public override string ToString()
        {
          var tmp466 = new StringBuilder("RowsSet_WriteValue_args(");
          tmp466.Append(", ObjectHandle: ");
          ObjectHandle.ToString(tmp466);
          if((Values != null))
          {
            tmp466.Append(", Values: ");
            Values.ToString(tmp466);
          }
          tmp466.Append(')');
          return tmp466.ToString();
        }
      }


      public partial class RowsSet_WriteValue_result : TBase
      {
        private global::QueryCat.Plugins.Sdk.QueryCatPluginException? _e;

        public global::QueryCat.Plugins.Sdk.QueryCatPluginException? E
        {
          get
          {
            return _e;
          }
          set
          {
            __isset.@e = true;
            this._e = value;
          }
        }


        public Isset __isset;
        public struct Isset
        {
          public bool @e;
        }

        public RowsSet_WriteValue_result()
        {
        }

        public async global::System.Threading.Tasks.Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken)
        {
          iprot.IncrementRecursionDepth();
          try
          {
            TField field;
            await iprot.ReadStructBeginAsync(cancellationToken);
            while (true)
            {
              field = await iprot.ReadFieldBeginAsync(cancellationToken);
              if (field.Type == TType.Stop)
              {
                break;
              }

              switch (field.ID)
              {
                case 1:
                  if (field.Type == TType.Struct)
                  {
                    E = new global::QueryCat.Plugins.Sdk.QueryCatPluginException();
                    await E.ReadAsync(iprot, cancellationToken);
                  }
                  else
                  {
                    await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
                  }
                  break;
                default: 
                  await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
                  break;
              }

              await iprot.ReadFieldEndAsync(cancellationToken);
            }

            await iprot.ReadStructEndAsync(cancellationToken);
          }
          finally
          {
            iprot.DecrementRecursionDepth();
          }
        }

        public async global::System.Threading.Tasks.Task WriteAsync(TProtocol oprot, CancellationToken cancellationToken)
        {
          oprot.IncrementRecursionDepth();
          try
          {
            var tmp468 = new TStruct("RowsSet_WriteValue_result");
            await oprot.WriteStructBeginAsync(tmp468, cancellationToken);
            var tmp469 = new TField();

            if(this.__isset.@e)
            {
              if (E != null)
              {
                tmp469.Name = "E";
                tmp469.Type = TType.Struct;
                tmp469.ID = 1;
                await oprot.WriteFieldBeginAsync(tmp469, cancellationToken);
                await E.WriteAsync(oprot, cancellationToken);
                await oprot.WriteFieldEndAsync(cancellationToken);
              }
            }
            await oprot.WriteFieldStopAsync(cancellationToken);
            await oprot.WriteStructEndAsync(cancellationToken);
          }
          finally
          {
            oprot.DecrementRecursionDepth();
          }
        }

        public override bool Equals(object? that)
        {
          if (that is not RowsSet_WriteValue_result other) return false;
          if (ReferenceEquals(this, other)) return true;
          return ((__isset.@e == other.__isset.@e) && ((!__isset.@e) || (global::System.Object.Equals(E, other.E))));
        }

        public override int GetHashCode() {
          int hashcode = 157;
          unchecked {
            if((E != null) && __isset.@e)
            {
              hashcode = (hashcode * 397) + E.GetHashCode();
            }
          }
          return hashcode;
        }

        public override string ToString()
        {
          var tmp470 = new StringBuilder("RowsSet_WriteValue_result(");
          int tmp471 = 0;
          if((E != null) && __isset.@e)
          {
            if(0 < tmp471++) { tmp470.Append(", "); }
            tmp470.Append("E: ");
            E.ToString(tmp470);
          }
          tmp470.Append(')');
          return tmp470.ToString();
        }
      }


      public partial class Blob_Read_args : TBase
      {

        public int ObjectHandle { get; set; } = 0;

        public int Offset { get; set; } = 0;

        public int Count { get; set; } = 0;

        public Blob_Read_args()
        {
        }

        public Blob_Read_args(int object_handle, int @offset, int @count) : this()
        {
          this.ObjectHandle = object_handle;
          this.Offset = @offset;
          this.Count = @count;
        }

        public async global::System.Threading.Tasks.Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken)
        {
          iprot.IncrementRecursionDepth();
          try
          {
            bool isset_object_handle = false;
            bool isset_offset = false;
            bool isset_count = false;
            TField field;
            await iprot.ReadStructBeginAsync(cancellationToken);
            while (true)
            {
              field = await iprot.ReadFieldBeginAsync(cancellationToken);
              if (field.Type == TType.Stop)
              {
                break;
              }

              switch (field.ID)
              {
                case 1:
                  if (field.Type == TType.I32)
                  {
                    ObjectHandle = await iprot.ReadI32Async(cancellationToken);
                    isset_object_handle = true;
                  }
                  else
                  {
                    await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
                  }
                  break;
                case 2:
                  if (field.Type == TType.I32)
                  {
                    Offset = await iprot.ReadI32Async(cancellationToken);
                    isset_offset = true;
                  }
                  else
                  {
                    await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
                  }
                  break;
                case 3:
                  if (field.Type == TType.I32)
                  {
                    Count = await iprot.ReadI32Async(cancellationToken);
                    isset_count = true;
                  }
                  else
                  {
                    await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
                  }
                  break;
                default: 
                  await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
                  break;
              }

              await iprot.ReadFieldEndAsync(cancellationToken);
            }

            await iprot.ReadStructEndAsync(cancellationToken);
            if (!isset_object_handle)
            {
              throw new TProtocolException(TProtocolException.INVALID_DATA);
            }
            if (!isset_offset)
            {
              throw new TProtocolException(TProtocolException.INVALID_DATA);
            }
            if (!isset_count)
            {
              throw new TProtocolException(TProtocolException.INVALID_DATA);
            }
          }
          finally
          {
            iprot.DecrementRecursionDepth();
          }
        }

        public async global::System.Threading.Tasks.Task WriteAsync(TProtocol oprot, CancellationToken cancellationToken)
        {
          oprot.IncrementRecursionDepth();
          try
          {
            var tmp472 = new TStruct("Blob_Read_args");
            await oprot.WriteStructBeginAsync(tmp472, cancellationToken);
            var tmp473 = new TField();
            tmp473.Name = "object_handle";
            tmp473.Type = TType.I32;
            tmp473.ID = 1;
            await oprot.WriteFieldBeginAsync(tmp473, cancellationToken);
            await oprot.WriteI32Async(ObjectHandle, cancellationToken);
            await oprot.WriteFieldEndAsync(cancellationToken);
            tmp473.Name = "offset";
            tmp473.Type = TType.I32;
            tmp473.ID = 2;
            await oprot.WriteFieldBeginAsync(tmp473, cancellationToken);
            await oprot.WriteI32Async(Offset, cancellationToken);
            await oprot.WriteFieldEndAsync(cancellationToken);
            tmp473.Name = "count";
            tmp473.Type = TType.I32;
            tmp473.ID = 3;
            await oprot.WriteFieldBeginAsync(tmp473, cancellationToken);
            await oprot.WriteI32Async(Count, cancellationToken);
            await oprot.WriteFieldEndAsync(cancellationToken);
            await oprot.WriteFieldStopAsync(cancellationToken);
            await oprot.WriteStructEndAsync(cancellationToken);
          }
          finally
          {
            oprot.DecrementRecursionDepth();
          }
        }

        public override bool Equals(object? that)
        {
          if (that is not Blob_Read_args other) return false;
          if (ReferenceEquals(this, other)) return true;
          return global::System.Object.Equals(ObjectHandle, other.ObjectHandle)
            && global::System.Object.Equals(Offset, other.Offset)
            && global::System.Object.Equals(Count, other.Count);
        }

        public override int GetHashCode() {
          int hashcode = 157;
          unchecked {
            hashcode = (hashcode * 397) + ObjectHandle.GetHashCode();
            hashcode = (hashcode * 397) + Offset.GetHashCode();
            hashcode = (hashcode * 397) + Count.GetHashCode();
          }
          return hashcode;
        }

        public override string ToString()
        {
          var tmp474 = new StringBuilder("Blob_Read_args(");
          tmp474.Append(", ObjectHandle: ");
          ObjectHandle.ToString(tmp474);
          tmp474.Append(", Offset: ");
          Offset.ToString(tmp474);
          tmp474.Append(", Count: ");
          Count.ToString(tmp474);
          tmp474.Append(')');
          return tmp474.ToString();
        }
      }


      public partial class Blob_Read_result : TBase
      {
        private byte[]? _success;
        private global::QueryCat.Plugins.Sdk.QueryCatPluginException? _e;

        public byte[]? Success
        {
          get
          {
            return _success;
          }
          set
          {
            __isset.@success = true;
            this._success = value;
          }
        }

        public global::QueryCat.Plugins.Sdk.QueryCatPluginException? E
        {
          get
          {
            return _e;
          }
          set
          {
            __isset.@e = true;
            this._e = value;
          }
        }


        public Isset __isset;
        public struct Isset
        {
          public bool @success;
          public bool @e;
        }

        public Blob_Read_result()
        {
        }

        public async global::System.Threading.Tasks.Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken)
        {
          iprot.IncrementRecursionDepth();
          try
          {
            TField field;
            await iprot.ReadStructBeginAsync(cancellationToken);
            while (true)
            {
              field = await iprot.ReadFieldBeginAsync(cancellationToken);
              if (field.Type == TType.Stop)
              {
                break;
              }

              switch (field.ID)
              {
                case 0:
                  if (field.Type == TType.String)
                  {
                    Success = await iprot.ReadBinaryAsync(cancellationToken);
                  }
                  else
                  {
                    await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
                  }
                  break;
                case 1:
                  if (field.Type == TType.Struct)
                  {
                    E = new global::QueryCat.Plugins.Sdk.QueryCatPluginException();
                    await E.ReadAsync(iprot, cancellationToken);
                  }
                  else
                  {
                    await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
                  }
                  break;
                default: 
                  await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
                  break;
              }

              await iprot.ReadFieldEndAsync(cancellationToken);
            }

            await iprot.ReadStructEndAsync(cancellationToken);
          }
          finally
          {
            iprot.DecrementRecursionDepth();
          }
        }

        public async global::System.Threading.Tasks.Task WriteAsync(TProtocol oprot, CancellationToken cancellationToken)
        {
          oprot.IncrementRecursionDepth();
          try
          {
            var tmp476 = new TStruct("Blob_Read_result");
            await oprot.WriteStructBeginAsync(tmp476, cancellationToken);
            var tmp477 = new TField();

            if(this.__isset.@success)
            {
              if (Success != null)
              {
                tmp477.Name = "Success";
                tmp477.Type = TType.String;
                tmp477.ID = 0;
                await oprot.WriteFieldBeginAsync(tmp477, cancellationToken);
                await oprot.WriteBinaryAsync(Success, cancellationToken);
                await oprot.WriteFieldEndAsync(cancellationToken);
              }
            }
            else if(this.__isset.@e)
            {
              if (E != null)
              {
                tmp477.Name = "E";
                tmp477.Type = TType.Struct;
                tmp477.ID = 1;
                await oprot.WriteFieldBeginAsync(tmp477, cancellationToken);
                await E.WriteAsync(oprot, cancellationToken);
                await oprot.WriteFieldEndAsync(cancellationToken);
              }
            }
            await oprot.WriteFieldStopAsync(cancellationToken);
            await oprot.WriteStructEndAsync(cancellationToken);
          }
          finally
          {
            oprot.DecrementRecursionDepth();
          }
        }

        public override bool Equals(object? that)
        {
          if (that is not Blob_Read_result other) return false;
          if (ReferenceEquals(this, other)) return true;
          return ((__isset.@success == other.__isset.@success) && ((!__isset.@success) || (TCollections.Equals(Success, other.Success))))
            && ((__isset.@e == other.__isset.@e) && ((!__isset.@e) || (global::System.Object.Equals(E, other.E))));
        }

        public override int GetHashCode() {
          int hashcode = 157;
          unchecked {
            if((Success != null) && __isset.@success)
            {
              hashcode = (hashcode * 397) + Success.GetHashCode();
            }
            if((E != null) && __isset.@e)
            {
              hashcode = (hashcode * 397) + E.GetHashCode();
            }
          }
          return hashcode;
        }

        public override string ToString()
        {
          var tmp478 = new StringBuilder("Blob_Read_result(");
          int tmp479 = 0;
          if((Success != null) && __isset.@success)
          {
            if(0 < tmp479++) { tmp478.Append(", "); }
            tmp478.Append("Success: ");
            Success.ToString(tmp478);
          }
          if((E != null) && __isset.@e)
          {
            if(0 < tmp479++) { tmp478.Append(", "); }
            tmp478.Append("E: ");
            E.ToString(tmp478);
          }
          tmp478.Append(')');
          return tmp478.ToString();
        }
      }


      public partial class Blob_GetLength_args : TBase
      {

        public int ObjectHandle { get; set; } = 0;

        public Blob_GetLength_args()
        {
        }

        public Blob_GetLength_args(int object_handle) : this()
        {
          this.ObjectHandle = object_handle;
        }

        public async global::System.Threading.Tasks.Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken)
        {
          iprot.IncrementRecursionDepth();
          try
          {
            bool isset_object_handle = false;
            TField field;
            await iprot.ReadStructBeginAsync(cancellationToken);
            while (true)
            {
              field = await iprot.ReadFieldBeginAsync(cancellationToken);
              if (field.Type == TType.Stop)
              {
                break;
              }

              switch (field.ID)
              {
                case 1:
                  if (field.Type == TType.I32)
                  {
                    ObjectHandle = await iprot.ReadI32Async(cancellationToken);
                    isset_object_handle = true;
                  }
                  else
                  {
                    await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
                  }
                  break;
                default: 
                  await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
                  break;
              }

              await iprot.ReadFieldEndAsync(cancellationToken);
            }

            await iprot.ReadStructEndAsync(cancellationToken);
            if (!isset_object_handle)
            {
              throw new TProtocolException(TProtocolException.INVALID_DATA);
            }
          }
          finally
          {
            iprot.DecrementRecursionDepth();
          }
        }

        public async global::System.Threading.Tasks.Task WriteAsync(TProtocol oprot, CancellationToken cancellationToken)
        {
          oprot.IncrementRecursionDepth();
          try
          {
            var tmp480 = new TStruct("Blob_GetLength_args");
            await oprot.WriteStructBeginAsync(tmp480, cancellationToken);
            var tmp481 = new TField();
            tmp481.Name = "object_handle";
            tmp481.Type = TType.I32;
            tmp481.ID = 1;
            await oprot.WriteFieldBeginAsync(tmp481, cancellationToken);
            await oprot.WriteI32Async(ObjectHandle, cancellationToken);
            await oprot.WriteFieldEndAsync(cancellationToken);
            await oprot.WriteFieldStopAsync(cancellationToken);
            await oprot.WriteStructEndAsync(cancellationToken);
          }
          finally
          {
            oprot.DecrementRecursionDepth();
          }
        }

        public override bool Equals(object? that)
        {
          if (that is not Blob_GetLength_args other) return false;
          if (ReferenceEquals(this, other)) return true;
          return global::System.Object.Equals(ObjectHandle, other.ObjectHandle);
        }

        public override int GetHashCode() {
          int hashcode = 157;
          unchecked {
            hashcode = (hashcode * 397) + ObjectHandle.GetHashCode();
          }
          return hashcode;
        }

        public override string ToString()
        {
          var tmp482 = new StringBuilder("Blob_GetLength_args(");
          tmp482.Append(", ObjectHandle: ");
          ObjectHandle.ToString(tmp482);
          tmp482.Append(')');
          return tmp482.ToString();
        }
      }


      public partial class Blob_GetLength_result : TBase
      {
        private long _success;
        private global::QueryCat.Plugins.Sdk.QueryCatPluginException? _e;

        public long Success
        {
          get
          {
            return _success;
          }
          set
          {
            __isset.@success = true;
            this._success = value;
          }
        }

        public global::QueryCat.Plugins.Sdk.QueryCatPluginException? E
        {
          get
          {
            return _e;
          }
          set
          {
            __isset.@e = true;
            this._e = value;
          }
        }


        public Isset __isset;
        public struct Isset
        {
          public bool @success;
          public bool @e;
        }

        public Blob_GetLength_result()
        {
        }

        public async global::System.Threading.Tasks.Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken)
        {
          iprot.IncrementRecursionDepth();
          try
          {
            TField field;
            await iprot.ReadStructBeginAsync(cancellationToken);
            while (true)
            {
              field = await iprot.ReadFieldBeginAsync(cancellationToken);
              if (field.Type == TType.Stop)
              {
                break;
              }

              switch (field.ID)
              {
                case 0:
                  if (field.Type == TType.I64)
                  {
                    Success = await iprot.ReadI64Async(cancellationToken);
                  }
                  else
                  {
                    await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
                  }
                  break;
                case 1:
                  if (field.Type == TType.Struct)
                  {
                    E = new global::QueryCat.Plugins.Sdk.QueryCatPluginException();
                    await E.ReadAsync(iprot, cancellationToken);
                  }
                  else
                  {
                    await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
                  }
                  break;
                default: 
                  await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
                  break;
              }

              await iprot.ReadFieldEndAsync(cancellationToken);
            }

            await iprot.ReadStructEndAsync(cancellationToken);
          }
          finally
          {
            iprot.DecrementRecursionDepth();
          }
        }

        public async global::System.Threading.Tasks.Task WriteAsync(TProtocol oprot, CancellationToken cancellationToken)
        {
          oprot.IncrementRecursionDepth();
          try
          {
            var tmp484 = new TStruct("Blob_GetLength_result");
            await oprot.WriteStructBeginAsync(tmp484, cancellationToken);
            var tmp485 = new TField();

            if(this.__isset.@success)
            {
              tmp485.Name = "Success";
              tmp485.Type = TType.I64;
              tmp485.ID = 0;
              await oprot.WriteFieldBeginAsync(tmp485, cancellationToken);
              await oprot.WriteI64Async(Success, cancellationToken);
              await oprot.WriteFieldEndAsync(cancellationToken);
            }
            else if(this.__isset.@e)
            {
              if (E != null)
              {
                tmp485.Name = "E";
                tmp485.Type = TType.Struct;
                tmp485.ID = 1;
                await oprot.WriteFieldBeginAsync(tmp485, cancellationToken);
                await E.WriteAsync(oprot, cancellationToken);
                await oprot.WriteFieldEndAsync(cancellationToken);
              }
            }
            await oprot.WriteFieldStopAsync(cancellationToken);
            await oprot.WriteStructEndAsync(cancellationToken);
          }
          finally
          {
            oprot.DecrementRecursionDepth();
          }
        }

        public override bool Equals(object? that)
        {
          if (that is not Blob_GetLength_result other) return false;
          if (ReferenceEquals(this, other)) return true;
          return ((__isset.@success == other.__isset.@success) && ((!__isset.@success) || (global::System.Object.Equals(Success, other.Success))))
            && ((__isset.@e == other.__isset.@e) && ((!__isset.@e) || (global::System.Object.Equals(E, other.E))));
        }

        public override int GetHashCode() {
          int hashcode = 157;
          unchecked {
            if(__isset.@success)
            {
              hashcode = (hashcode * 397) + Success.GetHashCode();
            }
            if((E != null) && __isset.@e)
            {
              hashcode = (hashcode * 397) + E.GetHashCode();
            }
          }
          return hashcode;
        }

        public override string ToString()
        {
          var tmp486 = new StringBuilder("Blob_GetLength_result(");
          int tmp487 = 0;
          if(__isset.@success)
          {
            if(0 < tmp487++) { tmp486.Append(", "); }
            tmp486.Append("Success: ");
            Success.ToString(tmp486);
          }
          if((E != null) && __isset.@e)
          {
            if(0 < tmp487++) { tmp486.Append(", "); }
            tmp486.Append("E: ");
            E.ToString(tmp486);
          }
          tmp486.Append(')');
          return tmp486.ToString();
        }
      }

    }

  }
}
